Skip to content

Commit

Permalink
Files reflect initial 'going from red to green' section of testing ch…
Browse files Browse the repository at this point in the history
…apter
  • Loading branch information
armandofox committed Sep 14, 2011
1 parent ec6d6f6 commit 23f9f2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/controllers/movies_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ def index
end

def search_tmdb
@movies = Movie.find_in_tmdb(params[:search_terms])
end

def new
Expand Down
3 changes: 2 additions & 1 deletion spec/controllers/movies_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
describe MoviesController do
describe 'searching TMDb' do
it 'should call the model method that performs TMDb search' do
post :search_tmdb, :params => {:search_terms => 'hardware'}
Movie.should_receive(:find_in_tmdb).with('hardware')
post :search_tmdb, {:search_terms => 'hardware'}
end
it 'should select the Search Results template for rendering'
it 'should make the TMDb search results available to that template'
Expand Down

0 comments on commit 23f9f2a

Please sign in to comment.