Sha256: b2db5db417ff40875a6204c7906e5a353861d8d3d921b87bda9be97bf05cde7c

Contents?: true

Size: 651 Bytes

Versions: 1

Compression:

Stored size: 651 Bytes

Contents

require "spec_helper"

RSpec.describe Document, type: :model do
  describe "`have_a_version_with` matcher", versioning: true do
    it "works with custom versions association" do
      document = Document.create!(name: "Foo")
      document.update_attributes!(name: "Bar")

      expect(document).to have_a_version_with(name: "Foo")
    end
  end

  describe "`have_a_version_with_changes` matcher", versioning: true do
    it "works with custom versions association" do
      document = Document.create!(name: "Foo")
      document.update_attributes!(name: "Bar")

      expect(document).to have_a_version_with_changes(name: "Bar")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
paper_trail-7.0.3 spec/models/document_spec.rb