saasbook

movies_controller_spec.3.rb

Aug 16th, 2013
675
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.       fake_results = [mock('movie1'), mock('movie2')]
  7.       Movie.should_receive(:find_in_tmdb).with('hardware').
  8.         and_return(fake_results)
  9.       post :search_tmdb, {:search_terms => 'hardware'}
  10.     end
  11.     it 'should select the Search Results template for rendering'
  12.     it 'should make the TMDb search results available to that template'
  13.   end
  14. end
Add Comment
Please, Sign In to add comment