spec/compel/coercion_spec.rb in compel-0.3.7 vs spec/compel/coercion_spec.rb in compel-0.4.0

- old
+ new

@@ -147,35 +147,35 @@ first_name: 'Joaquim', last_name: 'Adráz' }, Compel::Coercion::Hash) expect(value).to eq({ - 'first_name' => 'Joaquim', - 'last_name' => 'Adráz' + first_name: 'Joaquim', + last_name: 'Adráz' }) end it 'should coerce 1' do value = Compel::Coercion.coerce!({ 'first_name' => 'Joaquim', 'last_name' => 'Adráz' }, Compel::Coercion::Hash) expect(value).to eq({ - 'first_name' => 'Joaquim', - 'last_name' => 'Adráz' + first_name: 'Joaquim', + last_name: 'Adráz' }) end it 'should coerce 2' do - value = Compel::Coercion.coerce!(Hashie::Mash.new({ + value = Compel::Coercion.coerce!({ first_name: 'Joaquim', last_name: 'Adráz' - }), Compel::Coercion::Hash) + }, Compel::Coercion::Hash) expect(value).to eq({ - 'first_name' => 'Joaquim', - 'last_name' => 'Adráz' + first_name: 'Joaquim', + last_name: 'Adráz' }) end it 'should not coerce' do expect { Compel::Coercion.coerce!(123, Compel::Coercion::Hash) }.to \