spec/unit/axiom/algebra/difference/delete_spec.rb in axiom-0.1.0 vs spec/unit/axiom/algebra/difference/delete_spec.rb in axiom-0.1.1

- old
+ new

@@ -3,25 +3,25 @@ require 'spec_helper' describe Algebra::Difference, '#delete' do subject { object.delete(other) } - let(:object) { described_class.new(left, right) } - let(:left) { Relation.new(header, [ [ 1 ], [ 2 ], [ 3 ] ]) } - let(:right) { Relation.new(header, [ [ 1 ] ]) } - let(:other_relation) { Relation.new(header, [ [ 2 ] ]) } - let(:header) { [ [ :id, Integer ] ] } + let(:object) { described_class.new(left, right) } + let(:left) { Relation.new(header, [[1], [2], [3]]) } + let(:right) { Relation.new(header, [[1]]) } + let(:other_relation) { Relation.new(header, [[2]]) } + let(:header) { [[:id, Integer]] } shared_examples_for 'Algebra::Difference#delete' do it { should be_instance_of(described_class) } its(:left) { should eql(left.delete(other_relation.difference(right))) } its(:right) { should eql(right) } its(:header) { should == header } it 'deletes the tuples' do - should == [ [ 3 ] ] + should == [[3]] end end context 'with a relation' do let(:other) { other_relation }