diff options
author | Ken Collins <ken@metaskills.net> | 2009-05-11 23:22:20 -0400 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-18 13:40:45 -0700 |
commit | 87adecfef59577be17a9731245cb201ecb1b477f (patch) | |
tree | 222b26f46cf41edbc187e38ecdeecd71d522cfc0 /activerecord/test/cases | |
parent | a69b28a8b10fdcbb6801051e3086228b56891dbb (diff) | |
download | rails-87adecfef59577be17a9731245cb201ecb1b477f.tar.gz rails-87adecfef59577be17a9731245cb201ecb1b477f.tar.bz2 rails-87adecfef59577be17a9731245cb201ecb1b477f.zip |
Reimplement Fixtures.identify so that it consistently generates identities across ruby versions.
[#2633 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/fixtures_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb index 252bf4ff61..b07d4f3521 100644 --- a/activerecord/test/cases/fixtures_test.rb +++ b/activerecord/test/cases/fixtures_test.rb @@ -518,6 +518,11 @@ class FoxyFixturesTest < ActiveRecord::TestCase assert_equal(Fixtures.identify(:foo), Fixtures.identify(:foo)) end + def test_identifies_consistently + assert_equal 1281023246, Fixtures.identify(:ruby) + assert_equal 2140105598, Fixtures.identify(:sapphire_2) + end + TIMESTAMP_COLUMNS = %w(created_at created_on updated_at updated_on) def test_populates_timestamp_columns |