Sha256: c60d3ad538d24233a6e3d456e8fb591ed957b22ffa8293aa7779eaf535c89798

Contents?: true

Size: 567 Bytes

Versions: 1

Compression:

Stored size: 567 Bytes

Contents

# encoding: utf-8

require 'spec_helper'
require File.expand_path('../fixtures/classes', __FILE__)

describe Function::Predicate, '#call' do
  subject { object.call(tuple) }

  let(:header) { Relation::Header.coerce([[:id, Integer]]) }
  let(:tuple)  { Tuple.new(header, [1])                    }
  let(:object) { described_class.new(header[:id], 1)       }

  it 'sends the left and right value to self.class.call' do
    response = double('#call response')
    described_class.should_receive(:call).with(1, 1).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/function/predicate/call_spec.rb