test/unit/serializer_test.rb in paper_trail-4.0.0.beta1 vs test/unit/serializer_test.rb in paper_trail-4.0.0.beta2

- old
+ new

@@ -22,11 +22,11 @@ # Check values are stored as `YAML`. assert_equal @original_fluxor_attributes, YAML.load(@fluxor.versions[1].object) # This test can't consistently pass in Ruby1.8 because hashes do no preserve order, which means the order of the # attributes in the `YAML` can't be ensured. - if RUBY_VERSION.to_f >= 1.9 + if RUBY_VERSION >= '1.9' assert_equal YAML.dump(@original_fluxor_attributes), @fluxor.versions[1].object end end end @@ -57,11 +57,11 @@ # Check values are stored as JSON. assert_equal @original_fluxor_attributes, ActiveSupport::JSON.decode(@fluxor.versions[1].object) # This test can't consistently pass in Ruby1.8 because hashes do no preserve order, which means the order of the # attributes in the JSON can't be ensured. - if RUBY_VERSION.to_f >= 1.9 + if RUBY_VERSION >= '1.9' assert_equal ActiveSupport::JSON.encode(@original_fluxor_attributes), @fluxor.versions[1].object end end should 'store object_changes' do @@ -99,10 +99,10 @@ # Check values are stored as JSON. assert_equal @original_fluxor_attributes, ActiveSupport::JSON.decode(@fluxor.versions[1].object) # This test can't consistently pass in Ruby1.8 because hashes do no preserve order, which means the order of the # attributes in the JSON can't be ensured. - if RUBY_VERSION.to_f >= 1.9 + if RUBY_VERSION >= '1.9' assert_equal ActiveSupport::JSON.encode(@original_fluxor_attributes), @fluxor.versions[1].object end end should 'store object_changes' do