Permalink
Browse files

Fix ActiveRecord dup specs which don't work on 3.0.x

  • Loading branch information...
1 parent 31381cb commit 7959eaf1eacf6830de20b43589a3d0684874ea03 @obrie obrie committed Mar 1, 2013
Showing with 14 additions and 10 deletions.
  1. +14 −10 test/unit/integrations/active_record_test.rb
@@ -248,11 +248,13 @@ def test_should_persist_initial_state
assert_equal 'parked', record.state
end
- def test_should_persist_initial_state_on_dup
- record = @model.create.dup
- record.save
- record.reload
- assert_equal 'parked', record.state
+ unless ::ActiveRecord::VERSION::MAJOR == 3 && ::ActiveRecord::VERSION::MINOR == 0
+ def test_should_persist_initial_state_on_dup
+ record = @model.create.dup
+ record.save
+ record.reload
+ assert_equal 'parked', record.state
+ end
end
def test_should_use_stored_values_when_loading_from_database
@@ -347,11 +349,13 @@ def test_should_persist_initial_state
assert_equal 'parked', record.state
end
- def test_should_persist_initial_state_on_dup
- record = @model.create.dup
- record.save
- record.reload
- assert_equal 'parked', record.state
+ unless ::ActiveRecord::VERSION::MAJOR == 3 && ::ActiveRecord::VERSION::MINOR == 0
+ def test_should_persist_initial_state_on_dup
+ record = @model.create.dup
+ record.save
+ record.reload
+ assert_equal 'parked', record.state
+ end
end
def test_should_use_stored_values_when_loading_from_database

0 comments on commit 7959eaf

Please sign in to comment.