Re: [rspec-users] spec for not null

2009-05-26 Thread Diwakar, ANGLER - EIT
Thank you David it works -Original Message- From: rspec-users-boun...@rubyforge.org [mailto:rspec-users-boun...@rubyforge.org] On Behalf Of David Chelimsky Sent: Monday, May 25, 2009 6:57 PM To: rspec-users Subject: Re: [rspec-users] spec for not null On Mon, May 25, 2009 at 6:51 AM

[rspec-users] get_via_redirect in controller specs

2009-05-26 Thread Andrew Premdas
Want to do the following in my controller spec describe CheckoutController, "handling stale session" do before do session[:order_id] = 5 Order.delete_all end it "should not throw a 404" do get_via_direct :index end Getting the following error message, NoMethodError in 'CheckoutCo

Re: [rspec-users] get_via_redirect in controller specs

2009-05-26 Thread David Chelimsky
On Tue, May 26, 2009 at 9:42 AM, Andrew Premdas wrote: > Want to do the following in my controller spec > describe CheckoutController, "handling stale session" do > >   before do >    session[:order_id] = 5 >    Order.delete_all >  end > >  it "should not throw a 404" do >    get_via_direct :index

Re: [rspec-users] How to spec two lines in application_controller.rb

2009-05-26 Thread Andrew Timberlake
On Tue, May 26, 2009 at 4:32 PM, Hunt Jon wrote: > I need to spec the following lines: > >  helper :all # include all helpers, all the time >  protect_from_forgery # See > ActionController::RequestForgeryProtection for detail > > Can anybody give me a hint? > > I create "application_controller_spe

[rspec-users] How to spec two lines in application_controller.rb

2009-05-26 Thread Hunt Jon
I need to spec the following lines: helper :all # include all helpers, all the time protect_from_forgery # See ActionController::RequestForgeryProtection for detail Can anybody give me a hint? I create "application_controller_spec.rb" and now what? Jon __

Re: [rspec-users] get_via_redirect in controller specs

2009-05-26 Thread Andrew Premdas
2009/5/26 David Chelimsky > On Tue, May 26, 2009 at 9:42 AM, Andrew Premdas > wrote: > > Want to do the following in my controller spec > > describe CheckoutController, "handling stale session" do > > > > before do > >session[:order_id] = 5 > >Order.delete_all > > end > > > > it "sho

Re: [rspec-users] How to spec two lines in application_controller.rb

2009-05-26 Thread Fernando Perez
Hunt Jon wrote: > I need to spec the following lines: No you don't. They are thoroughly tested in the Rails framework and you didn't add any behavior to them, so reading them makes it immediately clear what they are doing. Don't worry without specing these 2 lines you'll still get your 100% cov

Re: [rspec-users] spec_server errors when reloading fixture replacement pl

2009-05-26 Thread Mark Wilden
On Sun, May 24, 2009 at 10:17 PM, Ben Mabey wrote: > > Well, so Spork was really created with testing in mind. It is more general > purpose than spec_server though. You can use it with any Ruby project, not > just Rails. You can also potentially use it with any other testing > framework that a

Re: [rspec-users] spec_server errors when reloading fixture replacement pl

2009-05-26 Thread Ben Johnson
Mark Wilden wrote: > On Sun, May 24, 2009 at 10:17 PM, Ben Mabey wrote: > Spork seems to have the same problem that I have with spec_server: it > doesn't reload classes I change. So if I'm doing TDD between a model and > its > spec, it doesn't help. > > ///ark I have the same problem. I like s

Re: [rspec-users] spec_server errors when reloading fixture replacement pl

2009-05-26 Thread Scott Taylor
On May 26, 2009, at 1:22 PM, Mark Wilden wrote: On Sun, May 24, 2009 at 10:17 PM, Ben Mabey wrote: Well, so Spork was really created with testing in mind. It is more general purpose than spec_server though. You can use it with any Ruby project, not just Rails. You can also potentially

Re: [rspec-users] spec_server errors when reloading fixture replacement pl

2009-05-26 Thread Ben Mabey
Scott Taylor wrote: On May 26, 2009, at 1:22 PM, Mark Wilden wrote: On Sun, May 24, 2009 at 10:17 PM, Ben Mabey > wrote: Well, so Spork was really created with testing in mind. It is more general purpose than spec_server though. You can use it with any

Re: [rspec-users] spec_server errors when reloading fixture replacement pl

2009-05-26 Thread Scott Taylor
On May 26, 2009, at 2:31 PM, Ben Mabey wrote: Scott Taylor wrote: On May 26, 2009, at 1:22 PM, Mark Wilden wrote: On Sun, May 24, 2009 at 10:17 PM, Ben Mabey mailto:b...@benmabey.com >> wrote: Well, so Spork was really created with testing in mind. It is more general purpose than

Re: [rspec-users] spec_server errors when reloading fixture replacement pl

2009-05-26 Thread Ben Mabey
Scott Taylor wrote: On May 26, 2009, at 2:31 PM, Ben Mabey wrote: Scott Taylor wrote: On May 26, 2009, at 1:22 PM, Mark Wilden wrote: On Sun, May 24, 2009 at 10:17 PM, Ben Mabey > wrote: Well, so Spork was really created with testing in mind. It is more g

Re: [rspec-users] spec_server errors when reloading fixture replacement pl

2009-05-26 Thread Scott Taylor
On May 26, 2009, at 3:06 PM, Ben Mabey wrote: Scott Taylor wrote: On May 26, 2009, at 2:31 PM, Ben Mabey wrote: Scott Taylor wrote: On May 26, 2009, at 1:22 PM, Mark Wilden wrote: On Sun, May 24, 2009 at 10:17 PM, Ben Mabey mailto:b...@benmabey.com >> wrote: Well, so Spork was real

[rspec-users] Any way to continue on Assertion Failure

2009-05-26 Thread Gary Lin
Hi, I wonder if there is any way to tell the test script to continue even when encountering an assertion failure? The reason I am asking this is because I have a test flow that can take a long time to run and it would be very useful if I can perform all verification at the end of test flow i

Re: [rspec-users] Any way to continue on Assertion Failure

2009-05-26 Thread David Chelimsky
On Tue, May 26, 2009 at 7:33 PM, Gary Lin wrote: > Hi, > > I wonder if there is any way to tell the test script to continue even when > encountering an assertion failure?  The reason I am asking this is because I > have a test flow that can take a long time to run and it would be very > useful if

Re: [rspec-users] Any way to continue on Assertion Failure

2009-05-26 Thread David Chelimsky
On Tue, May 26, 2009 at 7:58 PM, David Chelimsky wrote: > On Tue, May 26, 2009 at 7:33 PM, Gary Lin wrote: >> Hi, >> >> I wonder if there is any way to tell the test script to continue even when >> encountering an assertion failure?  The reason I am asking this is because I >> have a test flow th

Re: [rspec-users] Any way to continue on Assertion Failure

2009-05-26 Thread Julian Leviston
On 27/05/2009, at 9:33 AM, Gary Lin wrote: Hi, I wonder if there is any way to tell the test script to continue even when encountering an assertion failure? The reason I am asking this is because I have a test flow that can take a long time to run and it would be very useful if I can per

Re: [rspec-users] How do I get additional information from the Matcher?

2009-05-26 Thread David Chelimsky
On Wed, May 20, 2009 at 6:32 PM, Gary Lin wrote: > Hi, > > I am trying to implement my own matcher which use a special algorithm to do > the semantics diff-ing between two proprietary configuration file.  When > come to the report, I would like my formatter to be able to have access to > the origi

Re: [rspec-users] passing param values

2009-05-26 Thread David Chelimsky
On Fri, May 22, 2009 at 7:29 AM, Diwakar, ANGLER - EIT wrote: > > Still I am getting the same error > > describe UsersController do > >  describe :create       do >  before(:each)  do >    controller.stub!(:require_user).and_return(@user) >    controller.stub!(:uses_mailer).and_return(@user) >