Sha256: ab8c4c2e98cfe39fff27ba9a8aa8180a75afbef9c41dbea2848e6ae56f3b5c07
Contents?: true
Size: 582 Bytes
Versions: 1
Compression:
Stored size: 582 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Function, '.extract_value' do subject { object.extract_value(operand, tuple) } let(:header) { Relation::Header.coerce([ [ :id, Integer ] ]) } let(:tuple) { Tuple.new(header, [ 1 ]) } let(:object) { described_class } context 'when the operand responds to #call' do let(:operand) { header[:id] } it { should == 1 } end context 'when the operand does not respond to #call' do let(:operand) { mock('Value') } it { should equal(operand) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
axiom-0.1.0 | spec/unit/axiom/function/class_methods/extract_value_spec.rb |