Sha256: 774fac0fd73b2c585a8d22b1257f4bcc12891ece3db3e95f3529be2cace167fd

Contents?: true

Size: 677 Bytes

Versions: 2

Compression:

Stored size: 677 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

[:difference, :-].each do |method|
  describe Relation::Keys, "##{method}" do
    subject { object.send(method, other) }

    let(:object) { described_class.coerce([header])       }
    let(:other)  { described_class.coerce([other_header]) }
    let(:header) { [[:id, Integer]]                       }

    context 'when the attributes overlap' do
      let(:other_header) { [[:id, Integer]] }

      it { should be_instance_of(described_class) }

      it { should be_empty }
    end

    context 'when the attributes do not overlap' do
      let(:other_header) { [[:name, String]] }

      it { should be(object) }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
axiom-0.2.0 spec/unit/axiom/relation/keys/difference_spec.rb
axiom-0.1.1 spec/unit/axiom/relation/keys/difference_spec.rb