Advertisement
saasbook

Untitled

Feb 14th, 2012
3,745
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.50 KB | None | 0 0
  1. require 'spec_helper'
  2.  
  3. describe MoviesController do
  4.   describe 'searching TMDb' do
  5.     it 'should call the model method that performs TMDb search' do
  6.       Movie.should_receive(:find_in_tmdb).with('hardware')
  7.       post :search_tmdb, {:search_terms => 'hardware'}
  8.     end
  9.     it 'should select the Search Results template for rendering' do
  10.       Movie.stub(:find_in_tmdb)
  11.       post :search_tmdb, {:search_terms => 'hardware'}
  12.       response.should render_template('search_tmdb')
  13.     end
  14.   end
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement