Sha256: 25eea535a520f4711fd8219f4171c4acd219dc81f54ebf2c62731a1eebaeff97
Contents?: true
Size: 1.04 KB
Versions: 1
Compression:
Stored size: 1.04 KB
Contents
require 'spec_helper' describe 'Veritas::Relation::Operation::Order::DirectionSet#each' do subject { object.each { |direction| yields << direction } } let(:klass) { Relation::Operation::Order::DirectionSet } let(:attributes) { [ Attribute::Integer.new(:id), Attribute::String.new(:name) ] } let(:object) { klass.new(attributes) } let(:yields) { [] } it_should_behave_like 'a command method' it 'yields each direction' do expect { subject }.to change { yields.dup }. from([]). to(attributes.map { |attribute| attribute.asc }) end end describe 'Veritas::Relation::Operation::Order::DirectionSet' do subject { object.new(attributes) } let(:attributes) { [ Attribute::Integer.new(:id) ] } let(:object) { Relation::Operation::Order::DirectionSet } it { should be_kind_of(Enumerable) } it 'case matches Enumerable' do (Enumerable === subject).should be(true) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
veritas-0.0.2 | spec/unit/veritas/relation/operation/order/direction_set/each_spec.rb |