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/widget_spec.rb
2013-10-29 12:07:54 -04:00

23 lines
616 B
Ruby

require 'spec_helper'
describe Widget do
describe '`be_versioned` matcher' do
it { should be_versioned }
end
describe "`versioning` option" do
let(:widget) { Widget.create :name => 'Bob', :an_integer => 1 }
context :enabled, :versioning => true do
it 'should enable versioning for models wrapped within a block' do
widget.versions.size.should == 1
end
end
context '`disabled` (default)' do
it 'should not enable versioning for models wrapped within a block not marked to used versioning' do
widget.versions.size.should == 0
end
end
end
end