aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/yaml_serialization_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/yaml_serialization_test.rb')
-rw-r--r--activerecord/test/cases/yaml_serialization_test.rb6
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