spec/matcher_spec.rb in closure_tree-4.6.2 vs spec/matcher_spec.rb in closure_tree-4.6.3

- old
+ new

@@ -1,32 +1,34 @@ require 'spec_helper' describe 'ClosureTree::Test::Matcher' do describe 'be_a_closure_tree' do - it { UUIDTag.should be_a_closure_tree } - it { User.should be_a_closure_tree } - it { Label.should be_a_closure_tree.ordered } - it { Metal.should be_a_closure_tree.ordered(:sort_order) } - it { MenuItem.should be_a_closure_tree } - it { Contract.should_not be_a_closure_tree } + it { expect(UUIDTag).to be_a_closure_tree } + it { expect(User).to be_a_closure_tree } + it { expect(Label).to be_a_closure_tree.ordered } + it { expect(Metal).to be_a_closure_tree.ordered(:sort_order) } + it { expect(MenuItem).to be_a_closure_tree } + it { expect(Contract).not_to be_a_closure_tree } end describe 'ordered' do - it { Label.should be_a_closure_tree.ordered } - it { UUIDTag.should be_a_closure_tree.ordered } - it { Metal.should be_a_closure_tree.ordered(:sort_order) } + it { expect(Label).to be_a_closure_tree.ordered } + it { expect(UUIDTag).to be_a_closure_tree.ordered } + it { expect(Metal).to be_a_closure_tree.ordered(:sort_order) } end describe 'advisory_lock' do it 'should use advisory lock' do - User.should be_a_closure_tree.with_advisory_lock - Label.should be_a_closure_tree.ordered.with_advisory_lock - Metal.should be_a_closure_tree.ordered(:sort_order).with_advisory_lock + expect(User).to be_a_closure_tree.with_advisory_lock + expect(Label).to be_a_closure_tree.ordered.with_advisory_lock + expect(Metal).to be_a_closure_tree.ordered(:sort_order).with_advisory_lock end - it 'should not use advisory lock' do - MenuItem.should be_a_closure_tree.without_advisory_lock + describe MenuItem do + it 'should not use advisory lock' do + is_expected.to be_a_closure_tree.without_advisory_lock + end end end end