[rspec-users] rspec_on_rails, receive_and_render experiment

2007-11-13 Thread Zach Dennis
A recent exploration on receive_and_render to assist with some common view spec'ing can be found at http://www.continuousthinking.com/2007/11/14/rspec_on_rails-render_and_receive_matcher Suggestions and feedback are welcome. Thanks, -- Zach Dennis http://www.continuousthinking.com __

Re: [rspec-users] new to rspec, error running "rake rspec" on debian/etch

2007-11-13 Thread David Chelimsky
On Nov 13, 2007 5:37 PM, Dan Aronson <[EMAIL PROTECTED]> wrote: > I have the latest version of rspec and rails-rspec installed. What specifically did you install? Also what version of rails? Include revision numbers if you can. > I'm using > the debian versions of ruby and rails. On a new projec

Re: [rspec-users] Role of stories vs specs

2007-11-13 Thread David Chelimsky
On Nov 13, 2007 5:17 PM, Pat Maddox <[EMAIL PROTECTED]> wrote: > On Nov 13, 2007 11:51 AM, David Chelimsky <[EMAIL PROTECTED]> wrote: > > Keep in mind that that goes nearly unnoticed in java or .NET because > > of the refactoring tools available on those platforms. Change a method > > name once

Re: [rspec-users] testing scripts

2007-11-13 Thread barsalou
Ashley said: Message: 7 Date: Tue, 13 Nov 2007 20:43:53 + From: Ashley Moran <[EMAIL PROTECTED]> Subject: Re: [rspec-users] testing scripts To: rspec-users Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes On Nov 13, 2007, at 7:45 pm, ba

[rspec-users] new to rspec, error running "rake rspec" on debian/etch

2007-11-13 Thread Dan Aronson
I have the latest version of rspec and rails-rspec installed. I'm using the debian versions of ruby and rails. On a new project after a generate an "rspec_model" and then try to run "rake spec", I get the following error: [EMAIL PROTECTED]:~/projects/cw/registration$ rake spec (in /home/dan/

Re: [rspec-users] Role of stories vs specs

2007-11-13 Thread Pat Maddox
On Nov 13, 2007 11:51 AM, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Nov 13, 2007 1:10 PM, Pat Maddox <[EMAIL PROTECTED]> wrote: > > I've been thinking about the role that stories played compared to > > specs, and that "should we use should" thread brought those thoughts > > up again. > > > >

Re: [rspec-users] rails story runner returning a nil response code

2007-11-13 Thread Chris Parsons
On 13 Nov 2007, at 22:17, David Chelimsky wrote: On Nov 13, 2007 4:02 PM, Josh Knowles <[EMAIL PROTECTED]> wrote: On 11/13/07, David Chelimsky <[EMAIL PROTECTED]> wrote: No worries - what do you think about treating controllers the same way in stories that we do in controller examples? I

Re: [rspec-users] rails story runner returning a nil response code

2007-11-13 Thread David Chelimsky
On Nov 13, 2007 4:02 PM, Josh Knowles <[EMAIL PROTECTED]> wrote: > On 11/13/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > No worries - what do you think about treating controllers the same way > > in stories that we do in controller examples? > > I think that makes sense. Currently you have t

Re: [rspec-users] rails story runner returning a nil response code

2007-11-13 Thread Josh Knowles
On 11/13/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > No worries - what do you think about treating controllers the same way > in stories that we do in controller examples? I think that makes sense. Currently you have to view the test.log file to see the exceptions, I'd like to see these re-r

Re: [rspec-users] rails story runner returning a nil response code

2007-11-13 Thread David Chelimsky
On Nov 13, 2007 3:33 PM, Josh Knowles <[EMAIL PROTECTED]> wrote: > On 11/13/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > RailsStory just wraps ActionController::IntegrationTest, so you're > > getting what you would get from an IntegrationTest. > > You are correct. I was getting a stack-level

Re: [rspec-users] rails story runner returning a nil response code

2007-11-13 Thread Josh Knowles
On 11/13/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > RailsStory just wraps ActionController::IntegrationTest, so you're > getting what you would get from an IntegrationTest. You are correct. I was getting a stack-level-too-deep caused by a problem with how IntegrationTest was overwriting url

Re: [rspec-users] testing scripts

2007-11-13 Thread Ashley Moran
On Nov 13, 2007, at 7:45 pm, barsalou wrote: > What I'm doing now is wrapping the methods in a module, then including > the module at the top of the script. Can you post some examples of the modules, classes and methods you have? Every script I've written is basically just a little object-orien

Re: [rspec-users] rails story runner returning a nil response code

2007-11-13 Thread David Chelimsky
On Nov 13, 2007 2:23 PM, Josh Knowles <[EMAIL PROTECTED]> wrote: > Has anyone noticed any problems with the Rails story runner returning > a response code of "0" when doing get/post/etc methods? I just > grabbed the latest rails/rspec and just started noticing this problem, > http://pastie.caboo.s

Re: [rspec-users] Trouble stubbing a method

2007-11-13 Thread Scott Taylor
On Nov 13, 2007, at 3:23 PM, Matthew Lins wrote: > Hey guys, > > I'll try to explain this without the model code at first, since > there is so > much, but if need be, I'll pastie it. > > I have an Order model that makes API calls to a payment > gateway(TrustCommerce) during validation(to verify

Re: [rspec-users] Trouble stubbing a method

2007-11-13 Thread Matthew Lins
BTW...When I say, "this doesn't work" I mean the spec fails on the mock, saying the method was never called. But, indeed it was, I can verify it by the TrustCommerce logs. On 11/13/07 2:23 PM, "Matthew Lins" <[EMAIL PROTECTED]> wrote: > Hey guys, > > I'll try to explain this without the model

[rspec-users] Trouble stubbing a method

2007-11-13 Thread Matthew Lins
Hey guys, I'll try to explain this without the model code at first, since there is so much, but if need be, I'll pastie it. I have an Order model that makes API calls to a payment gateway(TrustCommerce) during validation(to verify the credit card information). I'd like to stub this behavior to av

[rspec-users] rails story runner returning a nil response code

2007-11-13 Thread Josh Knowles
Has anyone noticed any problems with the Rails story runner returning a response code of "0" when doing get/post/etc methods? I just grabbed the latest rails/rspec and just started noticing this problem, http://pastie.caboo.se/117497 Regular controller specs pass as expected. -- Josh Knowles

Re: [rspec-users] Autotest with rspec HTML output

2007-11-13 Thread Hans de Graaff
On Sun, 2007-11-11 at 17:21 +0100, aslak hellesoy wrote: > I think the simplest and best thing here would be a pure browser > solution with autorefresh. > It should only be a matter of tweaking the HTML output a little to: > * Implement autorefresh. Ajax based would require a lite server > (webric

Re: [rspec-users] Role of stories vs specs

2007-11-13 Thread David Chelimsky
On Nov 13, 2007 1:10 PM, Pat Maddox <[EMAIL PROTECTED]> wrote: > I've been thinking about the role that stories played compared to > specs, and that "should we use should" thread brought those thoughts > up again. > > First I want to discuss whether or not specs are authoritative > regarding the de

[rspec-users] testing scripts

2007-11-13 Thread barsalou
So in the past I've written a script that query's a remote DB, takes the data, validates it, then does some processing, producing a new file with the data in a completely different format. Since this is a script with it's own set of methods, etc, how do I go about testing the pieces parts? It

[rspec-users] Role of stories vs specs

2007-11-13 Thread Pat Maddox
I've been thinking about the role that stories played compared to specs, and that "should we use should" thread brought those thoughts up again. First I want to discuss whether or not specs are authoritative regarding the desired behavior of a system. I would say they're a good approximation of h

Re: [rspec-users] Story problem if parenthesis used in Given, When, Then or And

2007-11-13 Thread David Chelimsky
On Nov 13, 2007 11:54 AM, sinclair bain <[EMAIL PROTECTED]> wrote: > Submitted error #15608. Thanks! ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Story problem if parenthesis used in Given, When, Then or And

2007-11-13 Thread sinclair bain
Submitted error #15608. On Nov 13, 2007 12:16 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Nov 13, 2007 11:05 AM, sinclair bain <[EMAIL PROTECTED]> wrote: > > VERSION: rspec rails plugin current edge version > > XP/Cygwin on XP > > > > Hi, > > I hit this when trying to use parenthesis in

Re: [rspec-users] Spec slowdown

2007-11-13 Thread David Chelimsky
On Nov 13, 2007 10:52 AM, Jarkko Laine <[EMAIL PROTECTED]> wrote: > Is there something currently going on on the rspec trunk that causes > a massive slowdown when running rake spec and autotest (without > spec_server)? I updated to the latest trunk yesterday and the time > needed to run the specs o

Re: [rspec-users] Story problem if parenthesis used in Given, When, Then or And

2007-11-13 Thread David Chelimsky
On Nov 13, 2007 11:05 AM, sinclair bain <[EMAIL PROTECTED]> wrote: > VERSION: rspec rails plugin current edge version > XP/Cygwin on XP > > Hi, > I hit this when trying to use parenthesis in my stories ... (that'll teach > me!). > > If a scenario looks like the following: > > Story "User has stor

[rspec-users] Spec slowdown

2007-11-13 Thread Jarkko Laine
Is there something currently going on on the rspec trunk that causes a massive slowdown when running rake spec and autotest (without spec_server)? I updated to the latest trunk yesterday and the time needed to run the specs of my app jumped from ~20 seconds to more than a minute. The weird

[rspec-users] Story problem if parenthesis used in Given, When, Then or And

2007-11-13 Thread sinclair bain
VERSION: rspec rails plugin current edge version XP/Cygwin on XP Hi, I hit this when trying to use parenthesis in my stories ... (that'll teach me!). If a scenario looks like the following: Story "User has story with parentheses", %{ As a user I want parenthesis So that ... well I just do

Re: [rspec-users] Test case for file import

2007-11-13 Thread aslak hellesoy
look at the RDoc for should change... describe Task do fixtures :tasks # should put 2 tasks in the database it "should not import twice from CSV" do csv = File.dirname(__FILE__) + '/sample.csv' # It should have 4 new tasks lambda do Task.import_from_csv(csv) end.should chang

Re: [rspec-users] Autotest with rspec HTML output

2007-11-13 Thread Ben Mabey
Thanks for the suggestions Aslak. I ended up doing pretty much what you said. I added a custom formatter that added a little functionality onto the HTML formatter. Instead of using a server all I did was use prototype/lowpro to refresh the page until all the specs were complete. I then used

Re: [rspec-users] Test case for file import

2007-11-13 Thread Karni Karni
aslak hellesoy wrote: > On Nov 12, 2007 11:36 AM, KarniRevuri <[EMAIL PROTECTED]> wrote: >> typical windows file open controls." >> >> >> Please give me any ideas >> > > Is this related to the post that you replied to? > Your question is too vague. Can you be more specific about what you > need he

Re: [rspec-users] it "should [action] ..." vs it with an active voice

2007-11-13 Thread Wincent Colaiuta
(Coming in a little late on this thread...) Although I use "should" in basically all of my examples I share some of Brian's objections to it. IMO, the strongest argument against it is that it is repetitive, and the strongest argument in its favor is that it perfectly captures the discrepancy