Sha256: 81bace4dd847006b0ee62a44636a7ebac5ed0809a1d125970873f08f32a79de7
Contents?: true
Size: 606 Bytes
Versions: 1
Compression:
Stored size: 606 Bytes
Contents
require 'spec_helper' describe 'Veritas::Evaluator::Expression#add' do let(:klass) { Evaluator::Expression } let(:attribute) { Attribute::Integer.new(:id) } context 'when a function is provided' do subject { klass.new { |object| object.add(attribute, function) } } let(:function) { mock('Function') } its(:expressions) { should == { attribute => function } } end context 'when a block is provided' do subject { klass.new { |object| object.add(attribute, &block) } } let(:block) { proc {} } its(:expressions) { should == { attribute => block } } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
veritas-0.0.2 | spec/unit/veritas/evaluator/expression/add_spec.rb |