Sha256: 75be7601bc167d733a508d7b6d733655dae0284bb37acaa6c0fe8a159a557c41

Contents?: true

Size: 1.05 KB

Versions: 14

Compression:

Stored size: 1.05 KB

Contents

require 'spec_helper'

describe 'ClosureTree::Test::Matcher' do

  describe 'be_a_closure_tree' do
    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 { 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
      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

    describe MenuItem do
      it 'should not use advisory lock' do
        is_expected.to be_a_closure_tree.without_advisory_lock
      end
    end
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
closure_tree-6.6.0 spec/matcher_spec.rb
closure_tree-6.5.0 spec/matcher_spec.rb
closure_tree-6.4.0 spec/matcher_spec.rb
closure_tree-6.3.0 spec/matcher_spec.rb
closure_tree-6.2.0 spec/matcher_spec.rb
closure_tree-6.1.0 spec/matcher_spec.rb
closure_tree-6.0.0 spec/matcher_spec.rb
closure_tree-6.0.0.gamma spec/matcher_spec.rb
closure_tree-6.0.0.alpha spec/matcher_spec.rb
closure_tree-5.2.0 spec/matcher_spec.rb
closure_tree-5.1.1 spec/matcher_spec.rb
closure_tree-5.1.0 spec/matcher_spec.rb
closure_tree-5.0.0 spec/matcher_spec.rb
closure_tree-4.6.3 spec/matcher_spec.rb