Advertisement
Guest User

Untitled

a guest
Aug 1st, 2015
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #### modify spec/spec_helper.rb
  2.  
  3. ~~~ruby
  4. config.expect_with :rspec do |c|
  5. c.syntax = :expect
  6. end
  7. ~~~
  8.  
  9. #### modify spec/models/restaurant_spec.rb
  10.  
  11. ~~~ ruby
  12. require 'spec_helper'
  13.  
  14. describe Restaurant do
  15. subject(:restaurant) { FactoryGirl.build(:restaurant, name: nil)}
  16. it {expect(restaurant.valid?).to be_false}
  17. end
  18. ~~~
  19.  
  20. ~~~ ruby
  21.  
  22. #some code
  23.  
  24. ~~~
  25.  
  26. {% highlight ruby %}
  27.  
  28. {% endhighlight %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement