Sha256: e9f9289e25452e3c97f786538e4053bdc093de4ca296ad3f31a787290c265b76

Contents?: true

Size: 571 Bytes

Versions: 4

Compression:

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
veritas-0.0.7 spec/unit/veritas/function/predicate/call_spec.rb
veritas-0.0.6 spec/unit/veritas/function/predicate/call_spec.rb
veritas-0.0.5 spec/unit/veritas/function/predicate/call_spec.rb
veritas-0.0.4 spec/unit/veritas/function/predicate/call_spec.rb