diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-03-22 11:08:04 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-03-22 22:41:10 -0300 |
commit | b332891b2ab4188e9d39737f4d214812afa3ce2c (patch) | |
tree | 72974490c032f9a753f3fc41d335a049c8abbc05 /activerecord/test/cases/yaml_serialization_test.rb | |
parent | b714140f4df50d102e70b0151bbb3a09e470d61a (diff) | |
download | rails-b332891b2ab4188e9d39737f4d214812afa3ce2c.tar.gz rails-b332891b2ab4188e9d39737f4d214812afa3ce2c.tar.bz2 rails-b332891b2ab4188e9d39737f4d214812afa3ce2c.zip |
Add order to tests that rely on db ordering, to fix failing tests on pg
Also skip persistente tests related to UPDATE + ORDER BY for postgresql
PostgreSQL does not support updates with order by, and these tests are
failing randomly depending on the fixture loading order now.
Diffstat (limited to 'activerecord/test/cases/yaml_serialization_test.rb')
-rw-r--r-- | activerecord/test/cases/yaml_serialization_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/yaml_serialization_test.rb b/activerecord/test/cases/yaml_serialization_test.rb index 5a38f2c6ee..3b02526916 100644 --- a/activerecord/test/cases/yaml_serialization_test.rb +++ b/activerecord/test/cases/yaml_serialization_test.rb @@ -12,7 +12,7 @@ class YamlSerializationTest < ActiveRecord::TestCase end def test_roundtrip - topic = Topic.first + topic = Topic.order(:id).first assert topic t = YAML.load YAML.dump topic assert_equal topic, t @@ -24,7 +24,7 @@ class YamlSerializationTest < ActiveRecord::TestCase end def test_encode_with_coder - topic = Topic.first + topic = Topic.order(:id).first coder = {} topic.encode_with coder assert_equal({'attributes' => topic.attributes}, coder) @@ -34,7 +34,7 @@ class YamlSerializationTest < ActiveRecord::TestCase require 'psych' def test_psych_roundtrip - topic = Topic.first + topic = Topic.order(:id).first assert topic t = Psych.load Psych.dump topic assert_equal topic, t |