Advertisement
saasbook

Untitled

Feb 14th, 2012
3,822
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.44 KB | None | 0 0
  1. require 'spec_helper'
  2.  
  3. describe MoviesController do
  4.   describe 'searching TMDb' do
  5.     it 'should make the TMDb search results available to that template'
  6.       fake_results = [mock('Movie'), mock('Movie')]
  7.       Movie.stub(:find_in_tmdb).and_return(fake_results)
  8.       post :search_tmdb, {:search_terms => 'hardware'}
  9.       # look for controller method to assign @movies
  10.       assigns(:movies).should == fake_results
  11.     end
  12.   end
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement