Sha256: c60bb6fbe7be6c082110f5913d95fcc5c95f37cc1ffa8e16dab221d8957aa59d

Contents?: true

Size: 988 Bytes

Versions: 3

Compression:

Stored size: 988 Bytes

Contents

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 }
  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) }
  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
    end

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

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
closure_tree-4.6.2 spec/matcher_spec.rb
closure_tree-4.6.1 spec/matcher_spec.rb
closure_tree-4.6.0 spec/matcher_spec.rb