Sha256: c2cf9eb2fff2b8570839770e8ed171095cce6f0fb950d347eb62ab0ff9503c83
Contents?: true
Size: 639 Bytes
Versions: 1
Compression:
Stored size: 639 Bytes
Contents
# encoding: utf-8 require 'spec_helper' [ :call, :[] ].each do |method| describe Tuple, "##{method}" do subject { object.send(method, attribute) } let(:header) { Relation::Header.coerce([ [ :id, Integer ] ]) } let(:object) { described_class.new(header, [ 1 ]) } context 'with a known attribute' do let(:attribute) { header[:id] } it { should == 1 } end context 'with an unknown attribute' do let(:attribute) { Attribute::Integer.new(:other_id) } specify { expect { subject }.to raise_error(UnknownAttributeError, 'the attribute other_id is unknown') } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
axiom-0.1.0 | spec/unit/axiom/tuple/call_spec.rb |