Sha256: d34726a6de42fa66eb6bce4ca33ffa8292daff4cfe06a4734cfcda901c008c75

Contents?: true

Size: 477 Bytes

Versions: 4

Compression:

Stored size: 477 Bytes

Contents

require 'spec_helper'
module Alf
  describe Keys, "&" do

    subject{ left & right }

    context 'when disjoint' do
      let(:left) { Keys[ [:a] ] }
      let(:right){ Keys[ [:b] ] }

      let(:expected){ Keys[ ] }

      it{ should eq(expected) }
    end

    context 'when not disjoint' do
      let(:left) { Keys[ [:a, :b], [:c] ] }
      let(:right){ Keys[ [:d], [:b, :a] ] }

      let(:expected){ Keys[ [:a, :b] ] }

      it{ should eq(expected) }
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-types/keys/test_ampersand.rb
alf-core-0.14.0 spec/unit/alf-types/keys/test_ampersand.rb
alf-core-0.13.1 spec/unit/alf-types/keys/test_ampersand.rb
alf-core-0.13.0 spec/unit/alf-types/keys/test_ampersand.rb