Sha256: 51166964cc8a0c59196e42e96c1107d7b0611e83a817089b783cb70e68b7a2e2

Contents?: true

Size: 501 Bytes

Versions: 1

Compression:

Stored size: 501 Bytes

Contents

require 'spec_helper'

describe 'Veritas::Relation::Header#index' do
  subject { object.index(argument) }

  let(:klass)     { Relation::Header         }
  let(:attribute) { [ :id, Integer ]         }
  let(:object)    { klass.new([ attribute ]) }

  context 'when the argument is a known attribute' do
    let(:argument) { attribute }

    it { should == 0 }
  end

  context 'when the argument is an unknown attribute' do
    let(:argument) { [ :name, String ] }

    it { should be_nil }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
veritas-0.0.2 spec/unit/veritas/relation/header/index_spec.rb