test/unit/serializer_test.rb in paper_trail-3.0.6 vs test/unit/serializer_test.rb in paper_trail-3.0.7

- old
+ new

@@ -8,11 +8,11 @@ Fluxor.instance_eval <<-END has_paper_trail END @fluxor = Fluxor.create :name => 'Some text.' - @original_fluxor_attributes = @fluxor.send(:item_before_change).attributes # this is exactly what PaperTrail serializes + @original_fluxor_attributes = @fluxor.send(:item_before_change) # this is exactly what PaperTrail serializes @fluxor.update_attributes :name => 'Some more text.' end should 'work with the default `YAML` serializer' do # Normal behaviour @@ -39,11 +39,11 @@ Fluxor.instance_eval <<-END has_paper_trail END @fluxor = Fluxor.create :name => 'Some text.' - @original_fluxor_attributes = @fluxor.send(:item_before_change).attributes # this is exactly what PaperTrail serializes + @original_fluxor_attributes = @fluxor.send(:item_before_change) # this is exactly what PaperTrail serializes @fluxor.update_attributes :name => 'Some more text.' end teardown do PaperTrail.config.serializer = PaperTrail::Serializers::YAML @@ -81,10 +81,10 @@ Fluxor.instance_eval <<-END has_paper_trail END @fluxor = Fluxor.create - @original_fluxor_attributes = @fluxor.send(:item_before_change).attributes.reject { |k,v| v.nil? } # this is exactly what PaperTrail serializes + @original_fluxor_attributes = @fluxor.send(:item_before_change).reject { |k,v| v.nil? } # this is exactly what PaperTrail serializes @fluxor.update_attributes :name => 'Some more text.' end teardown do PaperTrail.config.serializer = PaperTrail::Serializers::YAML