spec/unit/axiom/relation/keys/class_methods/new_spec.rb in axiom-0.1.0 vs spec/unit/axiom/relation/keys/class_methods/new_spec.rb in axiom-0.1.1
- old
+ new
@@ -16,11 +16,11 @@
it { should be_empty }
end
context 'with an argument that responds to #to_ary and contains irreducible keys' do
- let(:argument) { [ Relation::Header.new([ id ]) ] }
+ let(:argument) { [Relation::Header.new([id])] }
it { should be_instance_of(object) }
it { should == argument }
@@ -29,14 +29,14 @@
expect { subject }.to_not change(argument, :frozen?)
end
end
context 'with an argument that responds to #to_ary and contains reducible keys' do
- let(:argument) { [ reducible_key, irreducible_key ] }
- let(:reducible_key) { Relation::Header.new([ id, name ]) }
- let(:irreducible_key) { Relation::Header.new([ id ]) }
+ let(:argument) { [reducible_key, irreducible_key] }
+ let(:reducible_key) { Relation::Header.new([id, name]) }
+ let(:irreducible_key) { Relation::Header.new([id]) }
- specify { expect { subject }.to raise_error(ReducibleKeyError, "reducible keys: #{[ reducible_key.to_set ].inspect}") }
+ specify { expect { subject }.to raise_error(ReducibleKeyError, "reducible keys: #{[reducible_key.to_set].inspect}") }
end
context 'when the argument is not a Keys and does not respond to #to_ary' do
let(:argument) { Object.new }