saasbook

movie_spec.4.rb

Jan 10th, 2012
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.35 KB | None | 0 0
  1. require 'spec_helper'
  2.  
  3. describe Movie do
  4.   describe 'searching Tmdb by keyword' do
  5.     # first 2 specs elided for brevity
  6.     it 'should raise an InvalidKeyError with invalid API key' do
  7.       Movie.stub(:api_key).and_return('INVALID')
  8.       lambda { Movie.find_in_tmdb('Inception') }.
  9.         should raise_error(Movie::InvalidKeyError)
  10.     end
  11.   end
  12. end
Add Comment
Please, Sign In to add comment