Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add test for write_state_without_persistence

  • Loading branch information...
commit 7e297ae190b391dbedec297305812f13dafaa248 1 parent c11822e
@zmillman zmillman authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 test/test_active_record.rb
View
7 test/test_active_record.rb
@@ -164,6 +164,13 @@ def setup
@light.update_attribute(:state, 'green')
assert @light.reload.green?, "reloaded state should come from database, not instance variable"
end
+
+ test "calling non-bang event updates state attribute" do
+ @light.reset
+ assert @light.red?
+ @light.green_on
+ assert_equal "green", @light.state
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.