Permalink
Browse files

Improve test for calling non-bang events

As per @troessner's suggestion on 7e297ae
  • Loading branch information...
1 parent eb00251 commit 11633688c89cb4af1e0ef12f7cf0010499a0e0b7 @zmillman zmillman committed May 1, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 test/test_active_record.rb
View
3 test/test_active_record.rb
@@ -166,10 +166,11 @@ def setup
end
test "calling non-bang event updates state attribute" do
- @light.reset
+ @light.reset!
assert @light.red?
@light.green_on
assert_equal "green", @light.state
+ assert_equal "red", @light.reload.state
end
end

0 comments on commit 1163368

Please sign in to comment.