search for: specshortcut

Displaying 1 result from an estimated 1 matches for "specshortcut".

2007 Feb 05
1
long jumping out of code in specs
...#39;t have to bother with either stubbing all the private methods called in my after_create hook, or making the mock I''m sending though this gauntlet respond properly to all the calls it gets. In my case calling RssParser.new is evidence enough that my code executed like it should. class SpecShortcut < Exception; end specify "should call the standard parsing methods" do RssParser.should_receive(:new).and_raise(SpecShortcut) lambda{do_action}.should_raise(SpecShortcut) end Feeling pain like this while writing specs is usally an indication that the code could be better...