Sha256: f78ad3b07a65a0b9d18c362af82763f272fa1922123372acfd560c5e4da67494
Contents?: true
Size: 683 Bytes
Versions: 1
Compression:
Stored size: 683 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Relation::Header, '#context' do subject { object.context(&block) } let(:object) { described_class.coerce([attribute]) } let(:attribute) { Attribute::Integer.new(:id) } let(:block) { ->(context) { } } let(:context) { double('context') } before do Axiom::Evaluator::Context.should_receive(:new).with(object) .and_yield(context) .and_return(context) end it 'is an evaluator context' do should be(context) end it 'yields an evaluator context' do expect { |block| object.context(&block) } .to yield_with_args(context) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
axiom-0.1.1 | spec/unit/axiom/relation/header/context_spec.rb |