diff options
author | Xavier Noria <fxn@hashref.com> | 2010-05-19 23:29:39 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-05-19 23:29:39 +0200 |
commit | 7f07cc364a7ee7ceae21b29b54467fde0db93389 (patch) | |
tree | 7c9dd8aaeda68731756ee108a8318239b04c80f0 /activeresource/test/cases/base/schema_test.rb | |
parent | b9fcd8d71f94702463b97545bb70ce4727c5b47e (diff) | |
parent | 61001e766de974a8864c0bc2cf915888d277a0ea (diff) | |
download | rails-7f07cc364a7ee7ceae21b29b54467fde0db93389.tar.gz rails-7f07cc364a7ee7ceae21b29b54467fde0db93389.tar.bz2 rails-7f07cc364a7ee7ceae21b29b54467fde0db93389.zip |
Merge remote branch 'rails/master'
Diffstat (limited to 'activeresource/test/cases/base/schema_test.rb')
-rw-r--r-- | activeresource/test/cases/base/schema_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activeresource/test/cases/base/schema_test.rb b/activeresource/test/cases/base/schema_test.rb index d9dc679941..136c827926 100644 --- a/activeresource/test/cases/base/schema_test.rb +++ b/activeresource/test/cases/base/schema_test.rb @@ -185,7 +185,7 @@ class SchemaTest < ActiveModel::TestCase #### test "should be able to use schema" do - assert Person.respond_to?(:schema), "should at least respond to the schema method" + assert_respond_to Person, :schema, "should at least respond to the schema method" assert_nothing_raised("Should allow the schema to take a block") do Person.schema { } @@ -199,7 +199,7 @@ class SchemaTest < ActiveModel::TestCase s = self attribute :foo, :string end - assert s.respond_to?(:attrs), "should return attributes in theory" + assert_respond_to s, :attrs, "should return attributes in theory" assert_equal({'foo' => 'string' }, s.attrs, "should return attributes in practice") end end @@ -308,8 +308,8 @@ class SchemaTest < ActiveModel::TestCase Person.schema { string new_attr_name_two } end - assert Person.new.respond_to?(new_attr_name), "should respond to the attribute in a passed-in schema, but failed on: #{new_attr_name}" - assert Person.new.respond_to?(new_attr_name_two), "should respond to the attribute from the schema, but failed on: #{new_attr_name_two}" + assert_respond_to Person.new, new_attr_name, "should respond to the attribute in a passed-in schema, but failed on: #{new_attr_name}" + assert_respond_to Person.new, new_attr_name_two, "should respond to the attribute from the schema, but failed on: #{new_attr_name_two}" end test "should not care about ordering of schema definitions" do @@ -326,8 +326,8 @@ class SchemaTest < ActiveModel::TestCase Person.schema = {new_attr_name.to_s => 'string'} end - assert Person.new.respond_to?(new_attr_name), "should respond to the attribute in a passed-in schema, but failed on: #{new_attr_name}" - assert Person.new.respond_to?(new_attr_name_two), "should respond to the attribute from the schema, but failed on: #{new_attr_name_two}" + assert_respond_to Person.new, new_attr_name, "should respond to the attribute in a passed-in schema, but failed on: #{new_attr_name}" + assert_respond_to Person.new, new_attr_name_two, "should respond to the attribute from the schema, but failed on: #{new_attr_name_two}" end # method_missing effects |