Sha256: 9c668944a9502de4627848899cadbd9fb31a33268a1b1eb3fde8679d9395a0cb
Contents?: true
Size: 514 Bytes
Versions: 3
Compression:
Stored size: 514 Bytes
Contents
require 'spec_helper' describe Animal, :type => :model do it { is_expected.to be_versioned } describe "STI", :versioning => true do it { expect(Animal.inheritance_column).to eq('species') } describe "updates to the `inheritance_column`" do subject { Cat.create!(:name => 'Leo') } it "should be allowed" do subject.update_attributes(:name => 'Spike', :species => 'Dog') dog = Animal.find(subject.id) expect(dog).to be_instance_of(Dog) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
paper_trail-3.0.9 | spec/models/animal_spec.rb |
paper_trail-3.0.8 | spec/models/animal_spec.rb |
paper_trail-3.0.7 | spec/models/animal_spec.rb |