spec/acfs/resource/persistence_spec.rb in acfs-1.7.0 vs spec/acfs/resource/persistence_spec.rb in acfs-2.0.0

- old
+ new

@@ -273,23 +273,23 @@ begin model.save! rescue StandardError nil end - expect(model.errors.to_hash).to be == {name: %w[required]} + expect(model.errors.to_hash).to eq({name: %w[required]}) end end end describe '.create!' do context 'with valid data' do let(:data) { {name: 'Idefix', age: 12} } it 'creates new resource' do model = model_class.create! data - expect(model.name).to be == 'Idefix' - expect(model.age).to be == 12 + expect(model.name).to eq 'Idefix' + expect(model.age).to eq 12 end it 'is persisted' do model = model_class.create! data expect(model).to be_persisted @@ -299,12 +299,12 @@ context 'with invalid data' do let(:data) { {name: nil, age: 12} } it 'raises an error' do expect { model_class.create! data }.to \ - raise_error(::Acfs::InvalidResource) do |error| - expect(error.errors).to be == {'name' => %w[required]} + raise_error(Acfs::InvalidResource) do |error| + expect(error.errors).to eq({'name' => %w[required]}) end end end end @@ -313,11 +313,11 @@ context 'with valid data' do let(:data) { {name: 'Idefix', age: 12} } it 'creates new resource' do - expect(model.name).to be == 'Idefix' - expect(model.age).to be == 12 + expect(model.name).to eq 'Idefix' + expect(model.age).to eq 12 end it 'is persisted' do expect(model).to be_persisted end