Re: [rspec-users] File loading bug

2008-02-18 Thread David Chelimsky
On Feb 18, 2008 6:07 PM, Steve <[EMAIL PROTECTED]> wrote: > On Mon, 18 Feb 2008 17:06:03 -0500, David Chelimsky wrote: > > > On Feb 18, 2008 4:59 PM, Steve > > <[EMAIL PROTECTED]> wrote: > >> Not sure if this is rspec or autotest. When autotest is running, and I > >> add new files in my rails proje

[rspec-users] render_to_string in a controller test?

2008-02-18 Thread EAW
Hi all, I know that in general, view and controller tests should be isolated, such that controller specs don't test views etc. However, I think I've run into a situation that might be an exception. My controller uses render_to_string to produce a chunk of HTML that it passes to a model to

Re: [rspec-users] Problem with testing for an exception from a controller method

2008-02-18 Thread Max Williams
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 v

[rspec-users] rspec_controller generator for HAML?

2008-02-18 Thread Steve
Is there currently an option to have the rspec_controller generator generate haml instead of erb view files, and the corresponding spec? Thanks, Steve ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-us

Re: [rspec-users] deep test with rspec?

2008-02-18 Thread Dan Manges
David Vollbracht spiked an rspec implementation for DeepTest: svn diff -r 20:21 http://deep-test.rubyforge.org/svn/trunk Unfortunately nobody has had time to finish it. If anybody is interested in working on it, that would be awesome. I can give you repo access. Dan On Feb 2, 2008 9:37 PM, Scott

Re: [rspec-users] Specs versus Stories

2008-02-18 Thread David Chelimsky
On Feb 18, 2008 6:38 PM, Victor Asteinza <[EMAIL PROTECTED]> wrote: > Isn't there redundancy between what is in your stories and your specs? > Or are your stories at a higher level and the specs are at a lower > level? That would make more sense to me. There would be some cross > over. but the sp

Re: [rspec-users] Specs versus Stories

2008-02-18 Thread Victor Asteinza
Isn't there redundancy between what is in your stories and your specs? Or are your stories at a higher level and the specs are at a lower level? That would make more sense to me. There would be some cross over. but the specs expand on what is in the stories > Message: 3 > Date: Mon, 18

Re: [rspec-users] File loading bug

2008-02-18 Thread Steve
On Mon, 18 Feb 2008 17:06:03 -0500, David Chelimsky wrote: > On Feb 18, 2008 4:59 PM, Steve > <[EMAIL PROTECTED]> wrote: >> Not sure if this is rspec or autotest. When autotest is running, and I >> add new files in my rails project, it doesn't notice. I have to restart >> autotest for it to start

Re: [rspec-users] File loading bug

2008-02-18 Thread David Chelimsky
On Feb 18, 2008 4:59 PM, Steve <[EMAIL PROTECTED]> wrote: > Not sure if this is rspec or autotest. When autotest is running, and I > add new files in my rails project, it doesn't notice. I have to restart > autotest for it to start seeing them. Not the end of the world, just a > small inconvenience

[rspec-users] File loading bug

2008-02-18 Thread Steve
Not sure if this is rspec or autotest. When autotest is running, and I add new files in my rails project, it doesn't notice. I have to restart autotest for it to start seeing them. Not the end of the world, just a small inconvenience. Steve ___ rspec

Re: [rspec-users] Specs versus Stories

2008-02-18 Thread Andrew WC Brown
My workflow is the following: Stories->Spec Views->Spec Controllers-Spec Models I'll write a few stories of what I think should it happen. Then I'll write my specs of what should show (and also do some static html page mockups) Then I'll spec my controllers and models I'll go back to my stories to

Re: [rspec-users] Problem with testing for an exception from a controller method

2008-02-18 Thread Max Williams
great minds :) thanks guys! On 18/02/2008, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On Feb 18, 2008 8:43 AM, Max Williams <[EMAIL PROTECTED]> wrote: > > ah yes of course :) > > > > So, now, "should_not be_success" passes ok, but should i be more > specific > > and require a particular error

Re: [rspec-users] Problem with testing for an exception from a controller method

2008-02-18 Thread David Chelimsky
On Feb 18, 2008 8:46 AM, Corey Haines <[EMAIL PROTECTED]> wrote: > 500? That's internal server error. You could set up an expectation for the > return, using a code you know isn't right (200?), then see what the actual > value is after you get the failing test. What he said :) > > > > On Feb 18,

Re: [rspec-users] Problem with testing for an exception from a controller method

2008-02-18 Thread David Chelimsky
On Feb 18, 2008 8:43 AM, Max Williams <[EMAIL PROTECTED]> wrote: > ah yes of course :) > > So, now, "should_not be_success" passes ok, but should i be more specific > and require a particular error code? If so, which would i get from a get > call that's failed because of a RuntimeError exception?

Re: [rspec-users] Problem with testing for an exception from a controller method

2008-02-18 Thread Corey Haines
500? That's internal server error. You could set up an expectation for the return, using a code you know isn't right (200?), then see what the actual value is after you get the failing test. On Feb 18, 2008 8:43 AM, Max Williams <[EMAIL PROTECTED]> wrote: > ah yes of course :) > > So, now, "shoul

Re: [rspec-users] Problem with testing for an exception from a controller method

2008-02-18 Thread Max Williams
ah yes of course :) So, now, "should_not be_success" passes ok, but should i be more specific and require a particular error code? If so, which would i get from a get call that's failed because of a RuntimeError exception? thanks! On 18/02/2008, Corey Haines <[EMAIL PROTECTED]> wrote: > > Won't

Re: [rspec-users] Problem with testing for an exception from a controller method

2008-02-18 Thread David Chelimsky
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: > > >

Re: [rspec-users] Problem with testing for an exception from a controller method

2008-02-18 Thread Corey Haines
Won't the exception get turned into a http return code from the get? 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 does

[rspec-users] Problem with testing for an exception from a controller method

2008-02-18 Thread Max Williams
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 "Us

[rspec-users] Specs versus Stories

2008-02-18 Thread Victor Asteinza
I am new to BDD and have been doing some reading and playing with rSpec. I am a little confused. I am not sure what the best practice for using stories and specs. Should I be writing stories first, then specs that would fulfill those stories, and then write the implementation code to have everyt

Re: [rspec-users] can't get (r)spec to work in non-rails project

2008-02-18 Thread Edvard Majakari
> I would think just have the spec_helper.rb file for the specs try to load > config/rspec.rb or something along those lines. Similar to how rspec for > rails just loads the rails env. It would then be up to the user to do the > necessary loading in that file. There's really no way to know what cra