1
0
Fork 0
mirror of https://github.com/paper-trail-gem/paper_trail.git synced 2022-11-09 11:33:19 -05:00
paper-trail-gem--paper_trail/spec/models/car_spec.rb
Jared Beck 38fa23873c Merge rails_helper into spec_helper
The reason some projects have both is so that some spec files can be
run in isolation, without the rails stuff. In practice, I don't find
myself ever doing this. So, the complexity of two files is unnecessary.
2017-05-30 00:59:55 -04:00

13 lines
352 B
Ruby

require "spec_helper"
RSpec.describe Car, type: :model do
it { is_expected.to be_versioned }
describe "changeset", versioning: true do
it "has the expected keys (see issue 738)" do
car = Car.create!(name: "Alice")
car.update_attributes(name: "Bob")
assert_includes car.versions.last.changeset.keys, "name"
end
end
end