Re: [rspec-users] Reorganize documentation for Cucumber at Github

2009-01-17 Thread Tom Cloyd
aslak hellesoy wrote: Ok, I'll give a stab at what a 5 minute introduction might contain. Please comment. 1) Who should use Cucumber, and what benefits can you get from it? 2) How Cucumber works (high level explanation without getting too technical). 3) Learn the nomenclature - features, s

Re: [rspec-users] [Cucumber, Rails] Testing arbitrary post action parameters

2009-01-17 Thread James Byrne
Matt Wynne wrote: > > If you look at the Rails documentation for the named route methods, I > think you might want to try something a bit more like this: > > user = User.find_by_username!(name) > put users_url(user, :user => {:administrator => true}) > Funnily enough, I tried this ex

Re: [rspec-users] [Cucumber, Rails] Testing arbitrary post action parameters

2009-01-17 Thread James Byrne
Matt Wynne wrote: > If you think you know the URL you want, why not try hard-coding it for > a while in the step until you get the desired effect on the > controller? Then you can add a spec for your routing which proves that > the call to users_url() with the parameters you're trying gives you >

Re: [rspec-users] [Cucumber, Rails] Testing arbitrary post action parameters

2009-01-17 Thread James Byrne
James Byrne wrote: > It seems that the first parameter to _put_ must be a hash. Which is completely wrong of course, the first argument to _put_ must be a path. I confused the argument to the named route method with that of the put method. It is the argument to the named route that must be

Re: [rspec-users] Putting shared specs in a separate file

2009-01-17 Thread Nick Hoffman
On 2009-01-17, at 14:16, LesFreeman wrote: Hello, I am trying to move shared specs out of my spec_helper and into separate files. I found an article about the process here:http:// blog.kineticweb.com/articles/2008/04/15/automagical-rspec-shared- example-loading-from-separate-files Essentially, I

Re: [rspec-users] Reorganize documentation for Cucumber at Github

2009-01-17 Thread Tom Cloyd
aslak hellesoy wrote: On Sun, Jan 18, 2009 at 1:34 AM, aslak hellesoy mailto:aslak.helle...@gmail.com>> wrote: On Sat, Jan 17, 2009 at 10:10 PM, Tom Cloyd mailto:tomcl...@comcast.net>> wrote: Fernando Perez wrote: Hi, I actually just noticed that Cucu

Re: [rspec-users] [Cucumber] Struggling with "multiple step definitions"

2009-01-17 Thread aslak hellesoy
On Sat, Jan 17, 2009 at 10:48 PM, Bart Zonneveld wrote: > Hey gang, > > I find myself struggling with multiple step definitions in cucumber all the > time. I regularly test the contents of my flash[:notice] in steps, since I > think that's part of the behaviour of the app. So, while implementing a

Re: [rspec-users] Testing arbitrary post action parameters

2009-01-17 Thread James Byrne
I still cannot get this to work. Tracing the actual calls in the log I see this: Processing UsersController#index (for 127.0.0.1 at 2009-01-17 18:32:54) [PUT] Parameters: {"action"=>"index", "controller"=>"users", "user"=>"2"} User Load (16.0ms) SELECT * FROM "users" Rendering template w

Re: [rspec-users] driving rspec from a Ruby script

2009-01-17 Thread Ed Keith
Rake has been on my list of tools to learn for a while not. This might be the time. Thank you. -EdK -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Reorganize documentation for Cucumber at Github

2009-01-17 Thread Tom Cloyd
aslak hellesoy wrote: On Sat, Jan 17, 2009 at 10:10 PM, Tom Cloyd > wrote: Fernando Perez wrote: Hi, I actually just noticed that Cucumber has plenty good documentation on its wiki at github. But the problems are: - T

Re: [rspec-users] Testing arbitrary post action parameters

2009-01-17 Thread James Byrne
James Byrne wrote: > > When /user named "(.*)" enables the administrator role/ do |name| > > put users_url( :user => User.find_by_username!(name) ), :user => > {:administrator => true} > > end > > Which at least does not blow up on me. But it does not set the > administrator flag to true e

Re: [rspec-users] Vendoring rspec 1.1.12 as a gem

2009-01-17 Thread Pat Maddox
On Sat, Jan 17, 2009 at 11:58 AM, David Chelimsky wrote: > On Sat, Jan 17, 2009 at 1:42 PM, David Chelimsky wrote: >> On Sat, Jan 17, 2009 at 11:06 AM, Wincent Colaiuta wrote: >>> Hi folks, >>> >>> Up until now I've always used RSpec as a plug-in in my vendor dir, but >>> seeing as the gem is th

Re: [rspec-users] Reorganize documentation for Cucumber at Github

2009-01-17 Thread aslak hellesoy
On Sun, Jan 18, 2009 at 1:34 AM, aslak hellesoy wrote: > > > On Sat, Jan 17, 2009 at 10:10 PM, Tom Cloyd wrote: > >> Fernando Perez wrote: >> >>> Hi, >>> >>> I actually just noticed that Cucumber has plenty good documentation on >>> its wiki at github. But the problems are: >>> >>> - The homepage

Re: [rspec-users] driving rspec from a Ruby script

2009-01-17 Thread Pat Maddox
On Sat, Jan 17, 2009 at 6:48 AM, Ed Keith wrote: > Ashley Moran wrote: >> On 16 Jan 2009, at 17:44, Ed Keith wrote: > >> You don't provide enough information for me to be sure, but what you >> describe sounds sufficiently high-level enough to make Cucumber[1] >> worth looking into. >> >> If you se

Re: [rspec-users] [Cucumber, Webrat, Rails] Unable to run 2 features in a row

2009-01-17 Thread Matt Wynne
On 18 Jan 2009, at 00:07, Fernando Perez wrote: Fernando Perez wrote: Hi, I have written 2 features that each have 1 scenario. When I execute each feature separately with "rake features FEATURE=features/..." they each pass, but when I do "rake features", the first feature passes, and th

Re: [rspec-users] Testing arbitrary post action parameters

2009-01-17 Thread James Byrne
Pat Maddox wrote: > Does > put users_url(user), :user => {:administrator => true} > not work? > I have spent a good deal of time trying to get this to work with no success. I have read the api regarding the put method in: ActionController::Integration::Session which is what I believe provide

Re: [rspec-users] [RSpec] Putting shared specs in a separate file

2009-01-17 Thread Ben Mabey
On 1/17/09 4:17 PM, Fernando Perez wrote: http://www.benmabey.com/2008/06/08/writing-macros-in-rspec/ Too bad the font and colors are completely unreadable by human eyes. How do you handle such websites? I remember on Mac there is an app that can invert colors of the display. LOL... S

Re: [rspec-users] Reorganize documentation for Cucumber at Github

2009-01-17 Thread aslak hellesoy
On Sat, Jan 17, 2009 at 10:10 PM, Tom Cloyd wrote: > Fernando Perez wrote: > >> Hi, >> >> I actually just noticed that Cucumber has plenty good documentation on >> its wiki at github. But the problems are: >> >> - The homepage is badly designed as it doesn't really outline an order >> to read oth

Re: [rspec-users] [RSpec] Putting shared specs in a separate file

2009-01-17 Thread Pat Maddox
On Sat, Jan 17, 2009 at 3:17 PM, Fernando Perez wrote: > >> http://www.benmabey.com/2008/06/08/writing-macros-in-rspec/ >> > Too bad the font and colors are completely unreadable by human eyes. How > do you handle such websites? I bumped up the font and I can read it fine. Also, I'm human. > I

Re: [rspec-users] Putting shared specs in a separate file

2009-01-17 Thread Pat Maddox
On Sat, Jan 17, 2009 at 11:16 AM, LesFreeman wrote: > Hello, > I am trying to move shared specs out of my spec_helper and into > separate files. I found an article about the process here:http:// > blog.kineticweb.com/articles/2008/04/15/automagical-rspec-shared- > example-loading-from-separate-fil

Re: [rspec-users] [Cucumber, Webrat] Unable to run 2 features in a row

2009-01-17 Thread Fernando Perez
Fernando Perez wrote: > Hi, > > I have written 2 features that each have 1 scenario. When I execute each > feature separately with "rake features FEATURE=features/..." they each > pass, but when I do "rake features", the first feature passes, and the > second one fails. > > In my Given steps, I p

Re: [rspec-users] Testing arbitrary post action parameters

2009-01-17 Thread Pat Maddox
On Sat, Jan 17, 2009 at 3:34 PM, James Byrne wrote: > James Byrne wrote: > >> >> I have spent a good deal of time trying to get this to work with no >> success. I have read the api regarding the put method in: >> >> ActionController::Integration::Session >> >> If I read this aright then in your

[rspec-users] [Cucumber, Webrat] Unable to run 2 features in a row

2009-01-17 Thread Fernando Perez
Hi, I have written 2 features that each have 1 scenario. When I execute each feature separately with "rake features FEATURE=features/..." they each pass, but when I do "rake features", the first feature passes, and the second one fails. In my Given steps, I populate the DB, and some Given steps a

Re: [rspec-users] [Cucumber, Rails] Testing arbitrary post action parameters

2009-01-17 Thread Matt Wynne
On 17 Jan 2009, at 23:34, James Byrne wrote: James Byrne wrote: I have spent a good deal of time trying to get this to work with no success. I have read the api regarding the put method in: ActionController::Integration::Session If I read this aright then in your example user should be a h

Re: [rspec-users] [RSpec] Putting shared specs in a separate file

2009-01-17 Thread Fernando Perez
> http://www.benmabey.com/2008/06/08/writing-macros-in-rspec/ > Too bad the font and colors are completely unreadable by human eyes. How do you handle such websites? I remember on Mac there is an app that can invert colors of the display. -- Posted via http://www.ruby-forum.com/. _

Re: [rspec-users] Testing arbitrary post action parameters

2009-01-17 Thread James Byrne
James Byrne wrote: > > I have spent a good deal of time trying to get this to work with no > success. I have read the api regarding the put method in: > > ActionController::Integration::Session > > If I read this aright then in your example user should be a hash, but a > hash of what? Where

Re: [rspec-users] [OT] Time for seperate cucumber mailing list?

2009-01-17 Thread Matt Wynne
On 17 Jan 2009, at 19:20, Mark Wilden wrote: A noble idea, but it's not going to happen. Oh yes it is... etc. ;) Matt Wynne http://blog.mattwynne.net http://www.songkick.com ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforg

Re: [rspec-users] [Cucumber] Struggling with "multiple step definitions"

2009-01-17 Thread Fernando Perez
Bart Zonneveld wrote: > Hey gang, > > Multiple step definitions That's because you have defined more than once a step, so instead of defining the same step for each feature, group step definitions by resource / domain concept / model / whatever-you-call-it for instance. here is a good document

Re: [rspec-users] [RSpec] Putting shared specs in a separate file

2009-01-17 Thread Matt Wynne
On 17 Jan 2009, at 19:16, LesFreeman wrote: Hello, I am trying to move shared specs out of my spec_helper and into separate files. I found an article about the process here:http:// blog.kineticweb.com/articles/2008/04/15/automagical-rspec-shared- example-loading-from-separate-files Essentially

[rspec-users] [Cucumber] Struggling with "multiple step definitions"

2009-01-17 Thread Bart Zonneveld
Hey gang, I find myself struggling with multiple step definitions in cucumber all the time. I regularly test the contents of my flash[:notice] in steps, since I think that's part of the behaviour of the app. So, while implementing a new feature, I ran into the following error: /opt/local/

Re: [rspec-users] Vendoring rspec 1.1.12 as a gem

2009-01-17 Thread David Chelimsky
On Sat, Jan 17, 2009 at 11:06 AM, Wincent Colaiuta wrote: > Hi folks, > > Up until now I've always used RSpec as a plug-in in my vendor dir, but > seeing as the gem is the endorsed way to install I decided I would try the > gem this time (still vendoring it though because I vendor everything). > >

Re: [rspec-users] Reorganize documentation for Cucumber at Github

2009-01-17 Thread Tom Cloyd
Fernando Perez wrote: Hi, I actually just noticed that Cucumber has plenty good documentation on its wiki at github. But the problems are: - The homepage is badly designed as it doesn't really outline an order to read other pages - It is impossible to make the difference between internal links

Re: [rspec-users] Time for seperate cucumber mailing list?

2009-01-17 Thread Mark Wilden
On Sat, Jan 17, 2009 at 7:11 AM, aslak hellesoy wrote: > Please start prefixing your questions: > > [RSpec] > [Cucumber] > [Webrat] (Webrat also has a separate mailing list) > [Rails] (Rails has tons of other forums too - please only ask here if it's > RSpec or Cucumber related) > [BDD] > [OT] (Of

Re: [rspec-users] [OT] please prefix your subject lines

2009-01-17 Thread Ben Mabey
On 1/17/09 12:46 PM, Matt Wynne wrote: On 17 Jan 2009, at 17:49, David Chelimsky wrote: Hi all, Our list has grown to encompass a variety of broad subjects, and it would help people to improve their own personal signal-to-noise ratios if we all started prefixing our subject lines. The excerp

Re: [rspec-users] Vendoring rspec 1.1.12 as a gem

2009-01-17 Thread David Chelimsky
On Sat, Jan 17, 2009 at 1:42 PM, David Chelimsky wrote: > On Sat, Jan 17, 2009 at 11:06 AM, Wincent Colaiuta wrote: >> Hi folks, >> >> Up until now I've always used RSpec as a plug-in in my vendor dir, but >> seeing as the gem is the endorsed way to install I decided I would try the >> gem this t

Re: [rspec-users] Vendoring rspec 1.1.12 as a gem

2009-01-17 Thread Matt Wynne
On 17 Jan 2009, at 17:06, Wincent Colaiuta wrote: Hi folks, Up until now I've always used RSpec as a plug-in in my vendor dir, but seeing as the gem is the endorsed way to install I decided I would try the gem this time (still vendoring it though because I vendor everything). Anyone had

[rspec-users] Putting shared specs in a separate file

2009-01-17 Thread LesFreeman
Hello, I am trying to move shared specs out of my spec_helper and into separate files. I found an article about the process here:http:// blog.kineticweb.com/articles/2008/04/15/automagical-rspec-shared- example-loading-from-separate-files Essentially, I created a spec/shared directory, then a file

Re: [rspec-users] [OT] please prefix your subject lines

2009-01-17 Thread David Chelimsky
On Sat, Jan 17, 2009 at 1:46 PM, Matt Wynne wrote: > > On 17 Jan 2009, at 17:49, David Chelimsky wrote: > >> Hi all, >> >> Our list has grown to encompass a variety of broad subjects, and it >> would help people to improve their own personal signal-to-noise ratios >> if we all started prefixing ou

Re: [rspec-users] App can't start on production server due to RSpec missing

2009-01-17 Thread Mark Wilden
On Sat, Jan 17, 2009 at 5:42 AM, Jonathan Linowes wrote: > > On Jan 16, 2009, at 4:15 PM, Fernando Perez wrote: > > I run rspec on my dev machine, but obviously not on my production >> machine, what would be the nicest way to handle such scenario? At the >> > > Actually, I run specs on my product

Re: [rspec-users] [OT] please prefix your subject lines

2009-01-17 Thread Matt Wynne
On 17 Jan 2009, at 17:49, David Chelimsky wrote: Hi all, Our list has grown to encompass a variety of broad subjects, and it would help people to improve their own personal signal-to-noise ratios if we all started prefixing our subject lines. The excerpt below was already posted by Alsak Hell

[rspec-users] Reorganize documentation for Cucumber at Github

2009-01-17 Thread Fernando Perez
Hi, I actually just noticed that Cucumber has plenty good documentation on its wiki at github. But the problems are: - The homepage is badly designed as it doesn't really outline an order to read other pages - It is impossible to make the difference between internal links to the wiki and links th

[rspec-users] Vendoring rspec 1.1.12 as a gem

2009-01-17 Thread Wincent Colaiuta
Hi folks, Up until now I've always used RSpec as a plug-in in my vendor dir, but seeing as the gem is the endorsed way to install I decided I would try the gem this time (still vendoring it though because I vendor everything). Anyone had any luck doing that? Here's what I did. First, to

[rspec-users] [OT] please prefix your subject lines

2009-01-17 Thread David Chelimsky
Hi all, Our list has grown to encompass a variety of broad subjects, and it would help people to improve their own personal signal-to-noise ratios if we all started prefixing our subject lines. The excerpt below was already posted by Alsak Hellesøy (after the suggestion from Kero van Gelder) in a

Re: [rspec-users] driving rspec from a Ruby script

2009-01-17 Thread David Chelimsky
On Sat, Jan 17, 2009 at 8:48 AM, Ed Keith wrote: > Ashley Moran wrote: >> On 16 Jan 2009, at 17:44, Ed Keith wrote: > >> You don't provide enough information for me to be sure, but what you >> describe sounds sufficiently high-level enough to make Cucumber[1] >> worth looking into. >> >> If you se

Re: [rspec-users] Cucumber Scenario Outlines Output Insufficient

2009-01-17 Thread Joseph Wilk
aslak hellesoy wrote: On Sat, Jan 17, 2009 at 5:08 AM, Andrew Premdas > wrote: I'm having problems knowing what a scenario outline I've created is doing. In particular I have no idea about what steps are being matched when the outline is run so when I br

Re: [rspec-users] Testing file attachment with Paperclip

2009-01-17 Thread Nick Hoffman
On 2009-01-17, at 05:10, Fernando Perez wrote: G'day again Fernando. IIRC, Paperclip's #save_attached_files is what takes care of saving the attachment to disk, uploading it to S3, etc. Here's a small gist that tests the allowance of JPG files, and ensures that the file isn't saved [to disk, f

Re: [rspec-users] Time for seperate cucumber mailing list?

2009-01-17 Thread aslak hellesoy
On Sat, Jan 17, 2009 at 2:21 PM, Kero van Gelder wrote: > >> Because traffic is increasing > > That's a bad reason to split a list. > > >> Because cucumber really is a seperate mature topic now. > > > > Good point. Can any newbies to the scene comment if this is confusing? > > It is mature. > But

Re: [rspec-users] driving rspec from a Ruby script

2009-01-17 Thread Ed Keith
Ashley Moran wrote: > On 16 Jan 2009, at 17:44, Ed Keith wrote: > You don't provide enough information for me to be sure, but what you > describe sounds sufficiently high-level enough to make Cucumber[1] > worth looking into. > > If you search the archives of this list I posted a very bad example

Re: [rspec-users] Time for seperate cucumber mailing list?

2009-01-17 Thread Tom Cloyd
Matt Wynne wrote: My thoughts: On 17 Jan 2009, at 04:18, Andrew Premdas wrote: Because traffic is increasing I don't mind, I would most likely still get both lists into my inbox anyway Because cucumber really is a seperate mature topic now. Good point. Can any newbies to the scene comme

Re: [rspec-users] App can't start on production server due to RSpec missing

2009-01-17 Thread Jonathan Linowes
On Jan 16, 2009, at 4:15 PM, Fernando Perez wrote: I run rspec on my dev machine, but obviously not on my production machine, what would be the nicest way to handle such scenario? At the Actually, I run specs on my production machine, cap deploy:spec :) since its a different platform from m

Re: [rspec-users] Cucumber Scenario Outlines Output Insufficient

2009-01-17 Thread aslak hellesoy
On Sat, Jan 17, 2009 at 5:08 AM, Andrew Premdas wrote: > I'm having problems knowing what a scenario outline I've created is doing. > In particular I have no idea about what steps are being matched when the > outline is run so when I break something I can't find out what is wrong. Is > there any

Re: [rspec-users] Time for seperate cucumber mailing list?

2009-01-17 Thread Kero van Gelder
>> Because traffic is increasing That's a bad reason to split a list. >> Because cucumber really is a seperate mature topic now. > > Good point. Can any newbies to the scene comment if this is confusing? It is mature. But is it separate? >> Because rspec overlap is getting smaller (relatively)

Re: [rspec-users] OT: Who To Ask About Screw.Unit?

2009-01-17 Thread Matt Wynne
On 16 Jan 2009, at 15:04, Mike Gaffney wrote: We're trying to get one of them up at work and we're currently adding selenium grid support to webrat. I was thinking of building a glue plugin on one of these frameworks so that they would just run as a webrat test via a rake task. Would anyon

Re: [rspec-users] Time for seperate cucumber mailing list?

2009-01-17 Thread Matt Wynne
My thoughts: On 17 Jan 2009, at 04:18, Andrew Premdas wrote: Because traffic is increasing I don't mind, I would most likely still get both lists into my inbox anyway Because cucumber really is a seperate mature topic now. Good point. Can any newbies to the scene comment if this is conf

Re: [rspec-users] App can't start on production server due to RSpec missing

2009-01-17 Thread Fernando Perez
> Make it print the message to STDERR instead of raising an error? Plus > add a > blurb like "You can ignore this warning if you didn't intend to run > specs" > > Aslak I like that too, +1 for me. > Obviously if your production code is explicitly calling rspec, you've > got bigger problems. As

Re: [rspec-users] Testing file attachment with Paperclip

2009-01-17 Thread Fernando Perez
> G'day again Fernando. IIRC, Paperclip's #save_attached_files is what > takes care of saving the attachment to disk, uploading it to S3, etc. > Here's a small gist that tests the allowance of JPG files, and ensures > that the file isn't saved [to disk, for me]: > http://gist.github.com/48264 > >