Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #### modify spec/spec_helper.rb
- ~~~ruby
- config.expect_with :rspec do |c|
- c.syntax = :expect
- end
- ~~~
- #### modify spec/models/restaurant_spec.rb
- ~~~ ruby
- require 'spec_helper'
- describe Restaurant do
- subject(:restaurant) { FactoryGirl.build(:restaurant, name: nil)}
- it {expect(restaurant.valid?).to be_false}
- end
- ~~~
- ~~~ ruby
- #some code
- ~~~
- {% highlight ruby %}
- {% endhighlight %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement