Skip to content

Commit c308d9d

Browse files
committed
use change expectation
1 parent e8e5941 commit c308d9d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spec/evaluation_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,10 @@
150150

151151
it "can be negated" do
152152
user = { key: 'x', name: 'Bob' }
153-
clause = { attribute: 'name', op: 'in', values: ['Bob'], negate: true }
154-
expect(clause_match_user(clause, user)).to be false
153+
clause = { attribute: 'name', op: 'in', values: ['Bob'] }
154+
expect {
155+
clause[:negate] = true
156+
}.to change {clause_match_user(clause, user)}.from(true).to(false)
155157
end
156158
end
157159

0 commit comments

Comments
 (0)