[rspec-users] Autotest setup to run Story Runner?

2008-02-14 Thread Kamal Fariz
Has anyone looked at hooking up the Story Runner to Autotest? Currently, the autotest hooks that rspec uses explicitly runs ./script/ spec, which when pointed to a story runner file doesn't do anything. (In fact, the generated spec.opts has an incompatible --format option - changing progress

Re: [rspec-users] Failed specs spike autotest

2008-02-14 Thread David Chelimsky
The source of the bug was a patch that we applied a while back. This was after the 1.1.3 release, so if you're using 1.1.3 you're fine. If you're using trunk, go ahead and update and you should be fine now. On Fri, Feb 15, 2008 at 12:31 AM, David Chelimsky <[EMAIL PROTECTED]> wrote: > I found the

Re: [rspec-users] specdoc and taskpaper

2008-02-14 Thread Will Sargent
On Thu, Feb 14, 2008 at 2:09 PM, Colin Campbell-McPherson <[EMAIL PROTECTED]> wrote: > I use task paper and love it. Definitely the fastest way to throw in todo > items. I wouldn't call the format yaml-ish though. Here's an example: > I use Toodledo myself. Works from anywhere, including iPhone,

Re: [rspec-users] Failed specs spike autotest

2008-02-14 Thread David Chelimsky
I found the source of the problem and I'm working on a fix. On Thu, Feb 14, 2008 at 11:16 PM, Steve <[EMAIL PROTECTED]> wrote: > On Fri, 15 Feb 2008 08:57:32 +0800, Kamal Fariz wrote: > > > > I got this too, but didn't bother to find out where and how script/ spec > > would sneak into the list

Re: [rspec-users] params are making my "should redirect_to" test fail - why??

2008-02-14 Thread Max Williams
Done, thanks everyone. On 14/02/2008, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On Thu, Feb 14, 2008 at 10:16 AM, Max Williams > > <[EMAIL PROTECTED]> wrote: > > > I'm new to rspec (and coding in general) but would it break a lot of > > people's tests if redirect_to was changed to do this by

Re: [rspec-users] params are making my "should redirect_to" test fail - why??

2008-02-14 Thread David Chelimsky
On Thu, Feb 14, 2008 at 5:15 AM, Max Williams <[EMAIL PROTECTED]> wrote: > Hi David - thanks for replying. The literal doesn't work either, because of > all the params at the end, and i don't have named routes in this old, > non-restful app. I see your point about the hash...is there any way to g

Re: [rspec-users] Wrong ZenTest being used?

2008-02-14 Thread Steve
On Thu, 14 Feb 2008 17:53:42 +, Steve wrote: > When I try to run autotest I get the following error: > > loading autotest/rails_rspec > /usr/local/lib/site_ruby/1.8/rubygems.rb:319:in `activate': can't > activate ZenTest (= 3.7.1), already activated ZenTest-3.9.1] > (Gem::Exception) > > This

[rspec-users] Wrong ZenTest being used?

2008-02-14 Thread Steve
When I try to run autotest I get the following error: loading autotest/rails_rspec /usr/local/lib/site_ruby/1.8/rubygems.rb:319:in `activate': can't activate ZenTest (= 3.7.1), already activated ZenTest-3.9.1] (Gem::Exception) This is after just upgrading to the latest of everything from a pre

Re: [rspec-users] Failed specs spike autotest

2008-02-14 Thread Steve
On Fri, 15 Feb 2008 08:57:32 +0800, Kamal Fariz wrote: > > I got this too, but didn't bother to find out where and how script/ spec > would sneak into the list of files to test. I got this even if i > explicitly exclude the file in my .autotest. > > The quick and dirty thing I did was: > >de

Re: [rspec-users] Spec'ing Rails request.env params

2008-02-14 Thread Mikel Lindsaar
On Fri, Feb 15, 2008 at 2:52 PM, Pat Maddox <[EMAIL PROTECTED]> wrote: > On Thu, Feb 14, 2008 at 6:45 PM, Mikel Lindsaar <[EMAIL PROTECTED]> wrote: > > I have an internal system that has a rails controller action that > > needs to behave differently based on browser type reported by > > reques

Re: [rspec-users] Spec'ing Rails request.env params

2008-02-14 Thread Pat Maddox
On Thu, Feb 14, 2008 at 6:45 PM, Mikel Lindsaar <[EMAIL PROTECTED]> wrote: > I have an internal system that has a rails controller action that > needs to behave differently based on browser type reported by > request.env['HTTP_USER_AGENT'] > > But I can't find a way to stub! mock or set this set

[rspec-users] Spec'ing Rails request.env params

2008-02-14 Thread Mikel Lindsaar
I have an internal system that has a rails controller action that needs to behave differently based on browser type reported by request.env['HTTP_USER_AGENT'] But I can't find a way to stub! mock or set this setting from within a spec. Looked through Test::Unit and can't find a straight forward w

Re: [rspec-users] Failed specs spike autotest

2008-02-14 Thread David Chelimsky
On Thu, Feb 14, 2008 at 7:57 PM, Kamal Fariz <[EMAIL PROTECTED]> wrote: > > Same thing happening here, though I didn't recognize that it's only > > after failures. The problem continues whether I use .autotest files or > > not. > > > > This is on a Rails 2.0.2 project, with rspec+rspec_on_rails

Re: [rspec-users] Failed specs spike autotest

2008-02-14 Thread Kamal Fariz
> Same thing happening here, though I didn't recognize that it's only > after failures. The problem continues whether I use .autotest files or > not. > > This is on a Rails 2.0.2 project, with rspec+rspec_on_rails r3306 in > vendor/plugins, and ZenTest 3.9.1 installed as a gem. I got this too, bu

[rspec-users] Loosing params and request info in 'if' statements

2008-02-14 Thread Kane Baccigalupi
Hi, I have been a bad TDD developer and developed before testing. My code is working fine, but I have been writing tests because it is the right thing to do. I am running into trouble with some controller methods that are saved in a separate lib module and included in the application.rb file. I st

Re: [rspec-users] Failed specs spike autotest

2008-02-14 Thread Kyle Hargraves
On Thu, Feb 14, 2008 at 3:37 PM, Steve <[EMAIL PROTECTED]> wrote: > I'm getting some weird behavior. I'm currently running on trunk rspec/ > rails, with 3.9.1 autotest. If a all tests succeed or are pending, > autotest just sits there dutifully with the blinking cursor. If an > example fails, it

Re: [rspec-users] specdoc and taskpaper

2008-02-14 Thread Colin Campbell-McPherson
I use task paper and love it. Definitely the fastest way to throw in todo items. I wouldn't call the format yaml-ish though. Here's an example: This is a project: - This is a task @done - Another Task @context Another Project: - Task again

[rspec-users] Failed specs spike autotest

2008-02-14 Thread Steve
I'm getting some weird behavior. I'm currently running on trunk rspec/ rails, with 3.9.1 autotest. If a all tests succeed or are pending, autotest just sits there dutifully with the blinking cursor. If an example fails, it will take a few seconds, and pop up this line: /usr/bin/ruby1.8 -S script

Re: [rspec-users] How to mock an association

2008-02-14 Thread Bryan Ray
I don't know exactly how you're using the code, but validates_presence_of :user_id seems redundant. If you've setup a relationship from Group to User then Active Record will be enforcing that validation for you. Just a thought ... Other than that you would probably do (without seeing any of your c

Re: [rspec-users] params are making my "should redirect_to" test fail - why??

2008-02-14 Thread Rick DeNatale
On Thu, Feb 14, 2008 at 10:32 AM, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Thu, Feb 14, 2008 at 10:16 AM, Max Williams > > <[EMAIL PROTECTED]> wrote: > > > I'm new to rspec (and coding in general) but would it break a lot of > > people's tests if redirect_to was changed to do this by defaul

Re: [rspec-users] params are making my "should redirect_to" test fail - why??

2008-02-14 Thread David Chelimsky
On Thu, Feb 14, 2008 at 10:16 AM, Max Williams <[EMAIL PROTECTED]> wrote: > I'm new to rspec (and coding in general) but would it break a lot of > people's tests if redirect_to was changed to do this by default? It's what > i expected it to do, personally, that is to pass if the given :action and

Re: [rspec-users] params are making my "should redirect_to" test fail - why??

2008-02-14 Thread Max Williams
I'm new to rspec (and coding in general) but would it break a lot of people's tests if redirect_to was changed to do this by default? It's what i expected it to do, personally, that is to pass if the given :action and :controller match up. If i pass a url string, and it's missing the params, then

Re: [rspec-users] params are making my "should redirect_to" test fail - why??

2008-02-14 Thread Rick DeNatale
On 2/14/08, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Thu, Feb 14, 2008 at 9:48 AM, Rick DeNatale <[EMAIL PROTECTED]> wrote: > > On 2/14/08, David Chelimsky <[EMAIL PROTECTED]> wrote: > > > On Thu, Feb 14, 2008 at 8:22 AM, Rick DeNatale <[EMAIL PROTECTED]> > wrote: > > > I don't have t

Re: [rspec-users] params are making my "should redirect_to" test fail - why??

2008-02-14 Thread David Chelimsky
On Thu, Feb 14, 2008 at 9:48 AM, Rick DeNatale <[EMAIL PROTECTED]> wrote: > On 2/14/08, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On Thu, Feb 14, 2008 at 8:22 AM, Rick DeNatale <[EMAIL PROTECTED]> wrote: > > > On 2/14/08, Max Williams <[EMAIL PROTECTED]> wrote: > > > > > > I've been look

[rspec-users] specdoc and taskpaper

2008-02-14 Thread Joseph Anthony Pasquale Holsten
Hello there, I was wondering if anyone had looked at taskpaper? [1] They've got a vaguely yaml inspired format for todo lists. It reminded me of specdocs. I wonder how much work it would be to convert or build it in? Anyone else interested in seeing this? http:// Joseph Holsten .com [1]

Re: [rspec-users] params are making my "should redirect_to" test fail - why??

2008-02-14 Thread Rick DeNatale
On 2/14/08, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Thu, Feb 14, 2008 at 8:22 AM, Rick DeNatale <[EMAIL PROTECTED]> wrote: > > On 2/14/08, Max Williams <[EMAIL PROTECTED]> wrote: > > > I've been looking for documentation for methods for the response > object, to > > > get the url, b

Re: [rspec-users] params are making my "should redirect_to" test fail - why??

2008-02-14 Thread David Chelimsky
On Thu, Feb 14, 2008 at 8:22 AM, Rick DeNatale <[EMAIL PROTECTED]> wrote: > On 2/14/08, Max Williams <[EMAIL PROTECTED]> wrote: > > Hi David - thanks for replying. The literal doesn't work either, because > of > > all the params at the end, and i don't have named routes in this old, > > non-re

Re: [rspec-users] params are making my "should redirect_to" test fail - why??

2008-02-14 Thread Max Williams
perfect - that's the method i was looking for. Thanks! On 14/02/2008, Rick DeNatale <[EMAIL PROTECTED]> wrote: > > On 2/14/08, Max Williams <[EMAIL PROTECTED]> wrote: > > Hi David - thanks for replying. The literal doesn't work either, > because of > > all the params at the end, and i don't have

Re: [rspec-users] params are making my "should redirect_to" test fail - why??

2008-02-14 Thread Rick DeNatale
On 2/14/08, Max Williams <[EMAIL PROTECTED]> wrote: > Hi David - thanks for replying. The literal doesn't work either, because of > all the params at the end, and i don't have named routes in this old, > non-restful app. I see your point about the hash...is there any way to get > the redirected-t

Re: [rspec-users] params are making my "should redirect_to" test fail - why??

2008-02-14 Thread Max Williams
Hi David - thanks for replying. The literal doesn't work either, because of all the params at the end, and i don't have named routes in this old, non-restful app. I see your point about the hash...is there any way to get the redirected-to url from 'response' and test against that? Then i could s