saasbook

movie_spec.3.rb

Jan 10th, 2012
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.33 KB | None | 0 0
  1. require 'spec_helper'
  2.  
  3. describe Movie do
  4.   describe 'searching Tmdb by keyword' do
  5.     # first spec elided for brevity
  6.     it 'should raise an InvalidKeyError with no API key' do
  7.       Movie.stub(:api_key).and_return('')
  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