test/unit/serializer_test.rb in paper_trail-5.1.1 vs test/unit/serializer_test.rb in paper_trail-5.2.0

- old
+ new

@@ -9,11 +9,11 @@ END @fluxor = Fluxor.create name: "Some text." # this is exactly what PaperTrail serializes - @original_fluxor_attributes = @fluxor.send(:attributes_before_change) + @original_fluxor_attributes = @fluxor.paper_trail.attributes_before_change @fluxor.update_attributes name: "Some more text." end should "work with the default `YAML` serializer" do @@ -39,11 +39,11 @@ END @fluxor = Fluxor.create name: "Some text." # this is exactly what PaperTrail serializes - @original_fluxor_attributes = @fluxor.send(:attributes_before_change) + @original_fluxor_attributes = @fluxor.paper_trail.attributes_before_change @fluxor.update_attributes name: "Some more text." end teardown do @@ -83,10 +83,11 @@ @fluxor = Fluxor.create # this is exactly what PaperTrail serializes @original_fluxor_attributes = @fluxor. - send(:attributes_before_change). + paper_trail. + attributes_before_change. reject { |_k, v| v.nil? } @fluxor.update_attributes name: "Some more text." end