Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'spec_helper'
- # always required for Rails apps - in spec/support/spec_helper.rb
- describe MoviesController do # outermost 'describe' usually for the class
- describe 'creating new movie' do # inner 'describe' for a method
- before(:each) do
- # executed before EACH example
- @submit = {:title => 'Milk', :rating => 'R'}
- end
- it 'should call Movie#create!' do
- Movie.should_receive(:create!).with(hash_including :title => 'Milk')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement