spec/unit/axiom/tuple/class_methods/coerce_spec.rb in axiom-0.1.0 vs spec/unit/axiom/tuple/class_methods/coerce_spec.rb in axiom-0.1.1
- old
+ new
@@ -3,29 +3,29 @@
require 'spec_helper'
describe Tuple, '.coerce' do
subject { object.coerce(header, argument) }
- let(:header) { Relation::Header.coerce([ [ :id, Integer ] ]) }
- let(:object) { described_class }
- let(:tuple) { object.new(header, [ 1 ]) }
+ let(:header) { Relation::Header.coerce([[:id, Integer]]) }
+ let(:object) { described_class }
+ let(:tuple) { object.new(header, [1]) }
context 'when the argument is a Tuple' do
let(:argument) { tuple }
- it { should equal(argument) }
+ it { should be(argument) }
end
context 'when the argument responds to #to_ary' do
- let(:argument) { [ 1 ] }
+ let(:argument) { [1] }
it { should be_instance_of(object) }
it { should eql(tuple) }
end
context 'when the argument is not a Tuple and does not respond to #to_ary' do
- let(:argument) { { :id => 1 } }
+ let(:argument) { { id: 1 } }
specify { expect { subject }.to raise_error(NoMethodError) }
end
end