Skip to content

Instantly share code, notes, and snippets.

@skatenerd
Created November 20, 2012 05:52
Show Gist options
  • Save skatenerd/4116286 to your computer and use it in GitHub Desktop.
Save skatenerd/4116286 to your computer and use it in GitHub Desktop.
rspec and pokemon
require 'rspec'
class ExceptionSad
def self.run(thing)
thing.hello
thing.wtf
rescue Exception => e
end
end
describe ExceptionSad do
it "calls hello on argument" do
foo = mock
foo.should_receive(:hello)
ExceptionSad.run(foo)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment