Advertisement
saasbook

Untitled

Feb 13th, 2016
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.50 KB | None | 0 0
  1. require 'rails_helper'
  2.  
  3. describe MoviesController do
  4.   describe 'searching TMDb' do
  5.     it 'calls the model method that performs TMDb search' do
  6.       fake_results = [mock('movie1'), mock('movie2')]
  7.       expect(Movie).to receive(:find_in_tmdb).with('hardware').
  8.         and_return(fake_results)
  9.       post :search_tmdb, {:search_terms => 'hardware'}
  10.     end
  11.     it 'selects the Search Results template for rendering'
  12.     it 'makes the TMDb search results available to that template'
  13.   end
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement