diff options
Diffstat (limited to 'activerecord/test/cases/relation_scoping_test.rb')
-rw-r--r-- | activerecord/test/cases/relation_scoping_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/relation_scoping_test.rb b/activerecord/test/cases/relation_scoping_test.rb index a50a4d4165..9494990b04 100644 --- a/activerecord/test/cases/relation_scoping_test.rb +++ b/activerecord/test/cases/relation_scoping_test.rb @@ -339,7 +339,7 @@ class DefaultScopingTest < ActiveRecord::TestCase def test_default_scoping_with_inheritance # Inherit a class having a default scope and define a new default scope klass = Class.new(DeveloperOrderedBySalary) - klass.send :default_scope, :limit => 1 + klass.send :default_scope, :limit => 1 # Scopes added on children should append to parent scope assert_equal 1, klass.scoped.limit_value @@ -413,7 +413,7 @@ class DefaultScopingTest < ActiveRecord::TestCase assert_equal 'David', PoorDeveloperCalledJamis.create!(:name => 'David').name assert_equal 200000, PoorDeveloperCalledJamis.create!(:name => 'David', :salary => 200000).salary end - + def test_create_attribute_overwrites_default_values assert_equal nil, PoorDeveloperCalledJamis.create!(:salary => nil).salary assert_equal 50000, PoorDeveloperCalledJamis.create!(:name => 'David').salary |