mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Rails 4 is just around the corner. Stuck with 1.8 until then.
This commit is contained in:
@@ -4,9 +4,9 @@ require 'models/admin/user'
|
||||
|
||||
class StoreTest < ActiveRecord::TestCase
|
||||
setup do
|
||||
@john = Admin::User.create(name: 'John Doe', color: 'black')
|
||||
@john = Admin::User.create(:name => 'John Doe', :color => 'black')
|
||||
end
|
||||
|
||||
|
||||
test "reading store attributes through accessors" do
|
||||
assert_equal 'black', @john.color
|
||||
assert_nil @john.homepage
|
||||
@@ -19,7 +19,7 @@ class StoreTest < ActiveRecord::TestCase
|
||||
assert_equal 'red', @john.color
|
||||
assert_equal '37signals.com', @john.homepage
|
||||
end
|
||||
|
||||
|
||||
test "accessing attributes not exposed by accessors" do
|
||||
@john.settings[:icecream] = 'graeters'
|
||||
@john.save
|
||||
|
||||
Reference in New Issue
Block a user