spec/unit/axiom/relation/operation/reverse/each_spec.rb in axiom-0.1.1 vs spec/unit/axiom/relation/operation/reverse/each_spec.rb in axiom-0.2.0

- old
+ new

@@ -3,24 +3,24 @@ require 'spec_helper' describe Relation::Operation::Reverse, '#each' do subject { object.each { |tuple| yields << tuple } } - let(:object) { described_class.new(order) } + let(:object) { described_class.new(sorted) } let(:relation) { Relation.new([[:id, Integer]], [[1], [2], [3]]) } - let(:order) { relation.sort_by { |r| r.id } } + let(:sorted) { relation.sort_by { |r| r.id } } let(:yields) { [] } it_should_behave_like 'an #each method' it 'yields only tuples' do subject - yields.each { |tuple| tuple.should be_instance_of(Tuple) } + yields.each { |tuple| expect(tuple).to be_instance_of(Tuple) } end it 'yields only tuples with the expected header' do subject - yields.each { |tuple| tuple.header.should be(object.header) } + yields.each { |tuple| expect(tuple.header).to be(object.header) } end it 'yields only tuples with the expected data in reverse order' do expect { subject }.to change { yields.dup } .from([])