Sha256: f994608075a01e972e5aa6cd5fe5e95ecd115e496913cfca47a89ae3fc2ff6e6

Contents?: true

Size: 727 Bytes

Versions: 1

Compression:

Stored size: 727 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 = mock('#call response')
    described_class.should_receive(:call).with(1, 2).and_return(response)
    should equal(response)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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