Sha256: a681a0823c7e94ad0aa13664cf172688bcda38a2f764cc3ebca0866b882206ea

Contents?: true

Size: 726 Bytes

Versions: 1

Compression:

Stored size: 726 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Relation::Operation::Order::Direction, '#call' do
  subject { object.call(left, right) }

  let(:described_class) { Class.new(Relation::Operation::Order::Direction) }
  let(:header)          { Relation::Header.coerce([[:id, Integer]])        }
  let(:left)            { Tuple.new(header, [1])                           }
  let(:right)           { Tuple.new(header, [2])                           }
  let(:object)          { described_class.new(header[:id])                 }

  it 'sends the tuple value to self.class.call' do
    response = double('#call response')
    described_class.should_receive(:call).with(1, 2).and_return(response)
    should be(response)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axiom-0.1.1 spec/unit/axiom/relation/operation/order/direction/call_spec.rb