mirror of
https://github.com/paper-trail-gem/paper_trail.git
synced 2022-11-09 11:33:19 -05:00
23 lines
616 B
Ruby
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
|