Sha256: 1f74b9c2e53b19c1f9c64ff9dc58d9d2197123cc5751d5989cc0c54e94731c8f
Contents?: true
Size: 1.03 KB
Versions: 2
Compression:
Stored size: 1.03 KB
Contents
require 'spec_helper' describe RspecExtensions do context 'default' do it 'should have versioning off by default' do PaperTrail.enabled?.should_not be_true end it 'should turn versioning on in a with_versioning block' do PaperTrail.enabled?.should_not be_true with_versioning do PaperTrail.enabled?.should be_true end PaperTrail.enabled?.should_not be_true end end context 'versioning: true', :versioning => true do it 'should have versioning on by default' do PaperTrail.enabled?.should be_true end it 'should keep versioning on after a with_versioning block' do PaperTrail.enabled?.should be_true with_versioning do PaperTrail.enabled?.should be_true end PaperTrail.enabled?.should be_true end end end describe Model do context 'be_versioned matcher', :versioning => true do it 'should respond to be_versioned' do model = Model.create(:name => 'Bob', :color => 'blue') model.should be_versioned end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rspec-paper_trail-0.0.9 | spec/rspec-paper_trail/versioning_extensions_spec.rb |
rspec-paper_trail-0.0.8 | spec/rspec-paper_trail/versioning_extensions_spec.rb |