Created
January 11, 2012 19:21
-
-
Save jimryan/1596283 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_sets_settings_with_hash | |
user = User.create :name => 'Mr. Foo' | |
user.settings[:three] = 3 | |
user.settings = { :one => 1, :two => 2 } | |
assert_equal 1, user.settings[:one] | |
assert_equal 2, user.settings[:two] | |
assert_equal 3, user.settings[:three] # ensure existing settings remain intact | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment