Sha256: 1d1cff6000855819cb02a479bd5f6e02077e6e4e8a3a1aef3311a440df99bbfa

Contents?: true

Size: 691 Bytes

Versions: 4

Compression:

Stored size: 691 Bytes

Contents

require 'spec_helper'
module Alf
  describe AttrList, 'sameset?' do

    subject{ left.sameset?(right) }

    context 'when equal' do
      let(:left){ AttrList[:id, :name] }
      let(:right){ AttrList[:name, :id] }

      it{ should be_true }
    end

    context 'when not equal' do
      let(:left){ AttrList[:id] }
      let(:right){ AttrList[:name, :id] }

      it{ should be_false }
    end

    context 'when disjoint' do
      let(:left){ AttrList[:status] }
      let(:right){ AttrList[:name, :id] }

      it{ should be_false }
    end

    context 'when both empty' do
      let(:left){ AttrList[] }
      let(:right){ AttrList[] }

      it{ should be_true }
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-types/attr_list/test_sameset.rb
alf-core-0.14.0 spec/unit/alf-types/attr_list/test_sameset.rb
alf-core-0.13.1 spec/unit/alf-types/attr_list/test_sameset.rb
alf-core-0.13.0 spec/unit/alf-types/attr_list/test_sameset.rb