spec/rspec_set_spec.rb in rspec-set-0.1.1 vs spec/rspec_set_spec.rb in rspec-set-0.1.2
- old
+ new
@@ -33,19 +33,19 @@
describe 'with a destroyed ActiveRecord model' do
set(:my_destroyed_object) do
ActiveRecordClassExample.create(name: 'Alfred', age: 77)
end
- it 'allows us to dstroy a model' do
+ it 'allows us to destroy a model' do
my_destroyed_object.destroy
expect(
ActiveRecordClassExample.find_by(id: my_destroyed_object.id)
).to be_nil
end
it 'reloads a destroyed model' do
- expect(my_destroyed_object.name).to eq('Alfred')
+ expect(my_destroyed_object.reload.name).to eq('Alfred')
end
end
describe 'with a stale model' do
set(:my_stale_object) do
@@ -160,6 +160,6 @@
context "when name is 'apple'" do
it 'is reloaded from the database' do
expect(subject.name).to eq('apple')
end
end
-end
\ No newline at end of file
+end