spec/readme_spec.rb in with_model-2.1.4 vs spec/readme_spec.rb in with_model-2.1.5
- old
+ new
@@ -59,11 +59,11 @@
expect(BlogPost.new.some_instance_method).to eq 'bacon'
end
it 'can do all the things a regular model can' do
record = BlogPost.new
- expect(record).to_not be_valid
+ expect(record).not_to be_valid
record.title = 'foo'
expect(record).to be_valid
expect(record.save).to eq true
expect(record.reload).to eq record
record.comments.create!(text: 'Lorem ipsum')
@@ -73,12 +73,11 @@
# with_model classes can have inheritance.
class Car < ActiveRecord::Base
self.abstract_class = true
end
- with_model :Ford, superclass: Car do
- end
+ with_model :Ford, superclass: Car
it 'has a specified superclass' do
expect(Ford < Car).to eq true
end
end
@@ -112,8 +111,8 @@
t.timestamps null: false
end
end
it 'respects the additional options' do
- expect(WithOptions.columns.map(&:name)).to_not include('id')
+ expect(WithOptions.columns.map(&:name)).not_to include('id')
end
end