Sha256: ac9f3d6d9acf7e36c95e98c6f2f4e5036f0a48d4156cecb131c0ecda70437172
Contents?: true
Size: 708 Bytes
Versions: 4
Compression:
Stored size: 708 Bytes
Contents
require 'spec_helper' module Alf describe AttrList, 'intersect?' do subject{ left.intersect?(right) } context 'when equal' do let(:left){ AttrList[:id, :name] } let(:right){ AttrList[:name, :id] } it{ should be_true } end context 'when not equal but intersect' do let(:left){ AttrList[:id] } let(:right){ AttrList[:name, :id] } it{ should be_true } 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