RAILS_GEM_VERSION = '1.1.6' rspec - Version 1.1.3
On 18/02/2008, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On Feb 18, 2008 8:30 AM, Corey Haines <[EMAIL PROTECTED]> wrote: > > Won't the exception get turned into a http return code from the get? > > It depends on a few things. > > Max - what versions of rspec and rails are you using? > > > > > > > > On Feb 18, 2008 8:29 AM, Max Williams <[EMAIL PROTECTED]> > wrote: > > > > > > > > > > > > > > I have a User controller where users aren't added with the usual > > new/create actions. I'm trying to set it so that it raises when 'new' > is > > called but it doesn't seem to be working - here's the method, test and > test > > result. Can anyone see why it's not working? > > > > > > #in controller > > > def new > > > raise "Users should be added with 'batch_add' rather than 'new" > > > end > > > > > > #test > > > describe "/new" do > > > it "should raise an error when called" do > > > lambda{get('new')}.should raise_error(RuntimeError) > > > end > > > end > > > > > > #test report > > > 'Admin::UserController /new should raise an error when called' FAILED > > > expected RuntimeError but nothing was raised > > > > > > > > > _______________________________________________ > > > rspec-users mailing list > > > rspec-users@rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > > > > > > > > -- > > http://www.coreyhaines.com > > The Internet's Premiere source of information about Corey Haines > > _______________________________________________ > > rspec-users mailing list > > rspec-users@rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users