Sha256: 987962552bf003247cd49872ebf15a65d1512903e69770c430fb489a554e8513

Contents?: true

Size: 757 Bytes

Versions: 2

Compression:

Stored size: 757 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Relation::Keys, '#extend' do
  subject { object.extend(attributes) }

  let(:object)    { described_class.coerce([header]) }
  let(:header)    { []                               }

  context 'with attributes that do not change the keys' do
    let(:attributes) { [] }

    it { should be(object) }
  end

  context 'with attributes that change the keys' do
    let(:attributes) { [:id] }

    it { should be_instance_of(described_class) }

    it { should == [attributes] }
  end

  context 'when the keys are empty' do
    let(:object)     { described_class.new }
    let(:attributes) { [:id]               }

    it { should be_instance_of(described_class) }

    it { should == [attributes] }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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