Re: [rspec-users] Cucumber: Group Given, Whens and Thens

2008-11-20 Thread Matt Wynne
On 20 Nov 2008, at 22:05, David Chelimsky wrote: On Thu, Nov 20, 2008 at 10:40 AM, Andrew Premdas <[EMAIL PROTECTED]> wrote: I actually prefer to keep these separate: Given I am logged in as Fred When I log in as Fred +1, though these days I would probably have the When step matcher call

Re: [rspec-users] Examples using cucumber, celerity, rspec

2008-11-20 Thread Alvin Schur
On Wed, Nov 19, 2008 at 3:43 PM, Ashley Moran <[EMAIL PROTECTED] > wrote: > > On Nov 17, 2008, at 1:00 am, Alvin Schur wrote: > > I created some simple examples using cucumber, celerity, and rspec to >> verify the behaviour of a web application. >> >> The examples include: >> >> * verifying java

Re: [rspec-users] Test::Unit Functional failure puzzle

2008-11-20 Thread David Chelimsky
On Thu, Nov 20, 2008 at 1:30 PM, James Byrne <[EMAIL PROTECTED]> wrote: > Not an RSpec question, but I was led to this problem by starting to use > autotest with cucumber and so, however unjustly, I feel that RSpec has > to shoulder some of the blame. > > I have a failing test in my clients_control

Re: [rspec-users] Missing method implementation_backtrace

2008-11-20 Thread rubyphunk
Hi, same problem here. I always used "example.implementation_backtrace" in a custom formatter to find out to which spec file a passing example belongs to. Is there another way to get the file path? lg // andreas On 20 Nov., 20:37, Scott Taylor <[EMAIL PROTECTED]> wrote: > On Nov 20, 2008, at 2

Re: [rspec-users] Cucumber: Group Given, Whens and Thens

2008-11-20 Thread David Chelimsky
On Thu, Nov 20, 2008 at 10:40 AM, Andrew Premdas <[EMAIL PROTECTED]> wrote: > Also occasionally you may want to use a when as a given. Cucumber > doesn't actually use the given|when|then|and to differentiate steps, > just the regex that comes after them. Sometimes I feel that it makes > sense as in

Re: [rspec-users] LinkedIn Group

2008-11-20 Thread Caius Durling
On 20 Nov 2008, at 13:28, Rahoul Baruah wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20 Nov 2008, at 13:18, Ashley Moran wrote: On Nov 20, 2008, at 12:20 pm, aslak hellesoy wrote: Ashley Moran has already created an RSpec group: http://www.linkedin.com/groups?about=&gid=1300277

[rspec-users] Test::Unit Functional failure puzzle

2008-11-20 Thread James Byrne
Not an RSpec question, but I was led to this problem by starting to use autotest with cucumber and so, however unjustly, I feel that RSpec has to shoulder some of the blame. I have a failing test in my clients_controller test and I cannot figure out what is wrong from the information provided from

Re: [rspec-users] Missing method implementation_backtrace

2008-11-20 Thread Scott Taylor
On Nov 20, 2008, at 2:35 PM, David Chelimsky wrote: On Thu, Nov 20, 2008 at 12:44 PM, Ben Fyvie <[EMAIL PROTECTED] > wrote: We just upgraded from rspec version 1.1.4 to rspec version 1.1.11 and found that this no longer exists: # File lib/spec/example/example_methods.rb, line 84 def

Re: [rspec-users] Missing method implementation_backtrace

2008-11-20 Thread David Chelimsky
On Thu, Nov 20, 2008 at 12:44 PM, Ben Fyvie <[EMAIL PROTECTED]> wrote: > We just upgraded from rspec version 1.1.4 to rspec version 1.1.11 and found > that this no longer exists: > > > > # File lib/spec/example/example_methods.rb, line 84 > > def implementation_backtrace > > eval("cal

Re: [rspec-users] RSpec, TestUnit, Cucumber and Autotest

2008-11-20 Thread James Byrne
Peter Jaros wrote: > In RSpec, if you have failing examples which you don't actually want > to deal with yet, you can make them pending, and Autotest will ignore > the fact that they're not working. I don't think Test::Unit provides > an equivalent feature, though. > > Peter Yes, and no. You c

[rspec-users] Missing method implementation_backtrace

2008-11-20 Thread Ben Fyvie
We just upgraded from rspec version 1.1.4 to rspec version 1.1.11 and found that this no longer exists: # File lib/spec/example/example_methods.rb, line 84 def implementation_backtrace eval("caller", @_implementation) end I don't really know what this method is for and

Re: [rspec-users] Mocking and stubbing model relationships

2008-11-20 Thread Ben Mabey
Nick Hoffman wrote: On 2008-11-18, at 15:49, Ben Mabey wrote: Nick Hoffman wrote: Before writing specs for a one-to-many relationship between two models, I did some research and found that some people were creating proxy mocks, and others were using Matthew Heidemann's #stub_association! (whi

Re: [rspec-users] Mocking and stubbing model relationships

2008-11-20 Thread Nick Hoffman
On 2008-11-19, at 12:26, Chris Flipse wrote: I've actually taken this old gem and enhanced it a bit module Spec::Mocks::Methods def stub_association!(association_name, methods_to_be_stubbed ={}) mock_assn = Spec::Mocks::Mock.new(association_name.to_s) stub_association_with(association_

Re: [rspec-users] Mocking and stubbing model relationships

2008-11-20 Thread Nick Hoffman
On 2008-11-18, at 15:49, Ben Mabey wrote: Nick Hoffman wrote: Before writing specs for a one-to-many relationship between two models, I did some research and found that some people were creating proxy mocks, and others were using Matthew Heidemann's #stub_association! (which essentially doe

Re: [rspec-users] Mocking and stubbing model relationships

2008-11-20 Thread Nick Hoffman
On 2008-11-18, at 07:33, Rahoul Baruah wrote: On 18 Nov 2008, at 05:41, Nick Hoffman wrote: Before writing specs for a one-to-many relationship between two models, I did some research and found that some people were creating proxy mocks, and others were using Matthew Heidemann's #stub_assoc

Re: [rspec-users] testing an action which requires picture

2008-11-20 Thread Nick Hoffman
On 2008-11-18, at 01:53, Mano ah wrote: Nick Hoffman wrote: On 2008-11-14, at 06:29, Mano ah wrote: image = Image.new image.blob= params[:image][:blob] image.save_picture end -- Hi Mano. It doesn't really matter whether or not your "picture" model interacts with a database

Re: [rspec-users] RSpec, TestUnit, Cucumber and Autotest

2008-11-20 Thread Peter Jaros
On Thu, Nov 20, 2008 at 11:55 AM, Ben Mabey <[EMAIL PROTECTED]> wrote: > James Byrne wrote: > >> It is not immediately clear to me whether this behaviour is >> intended or not. Can someone provide the answer? >> > > After reading the wiki I think what you are seeing is the expected > behaviour.

Re: [rspec-users] specifying which button webrat should press

2008-11-20 Thread Pau Cor
Andrew Premdas wrote: > And I accept Fred's invite > scans better than > And I push "accept" near "Fred" That definitely is better. I guess I was trying to be too broad. My original goal was to write a match that would work on any page with multiple links/buttons (of the same name). It see

[rspec-users] [ANN] Webrat Google group

2008-11-20 Thread Ryan Briones
http://groups.google.com/group/webrat/ Been noticing a lot of webrat specific messages coming by the rspec-users mailing list, so I wanted people to be aware that there is also a Webrat Google group available for webrat-related needs. Also, if you're an IRC type and have a question or just to hang,

Re: [rspec-users] RSpec, TestUnit, Cucumber and Autotest

2008-11-20 Thread Ben Mabey
James Byrne wrote: James Byrne wrote: OS=CentOS-5.2 Ruby=1.8.6 Rails=2.2.1_RC Gems all up to date I have been experimenting with autotest and I have a few questions. 1. given: export AUTOFEATURES=true, if ./test exists (with tests) then these tests are run and the features are not. Is this

Re: [rspec-users] Cucumber: Group Given, Whens and Thens

2008-11-20 Thread Andrew Premdas
Also occasionally you may want to use a when as a given. Cucumber doesn't actually use the given|when|then|and to differentiate steps, just the regex that comes after them. Sometimes I feel that it makes sense as in the following examples When I log in as Fred Given I log in as F

Re: [rspec-users] RSpec, TestUnit, Cucumber and Autotest

2008-11-20 Thread James Byrne
James Byrne wrote: > OS=CentOS-5.2 > Ruby=1.8.6 > Rails=2.2.1_RC > Gems all up to date > > I have been experimenting with autotest and I have a few questions. > > 1. given: export AUTOFEATURES=true, if ./test exists (with tests) then > these tests are run and the features are not. Is this intend

Re: [rspec-users] Cucumber: Group Given, Whens and Thens

2008-11-20 Thread Matt Wynne
Have a read of this: http://github.com/aslakhellesoy/cucumber/wikis/step-organisation Basically rather than saving your steps in files named around the feature, it's better to group them around the object(s) they work on. On 20 Nov 2008, at 15:28, aidy lewis wrote: Hi, Do you think this is

Re: [rspec-users] LinkedIn Group

2008-11-20 Thread Matt Wynne
On 20 Nov 2008, at 13:28, Rahoul Baruah wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20 Nov 2008, at 13:18, Ashley Moran wrote: On Nov 20, 2008, at 12:20 pm, aslak hellesoy wrote: Ashley Moran has already created an RSpec group: http://www.linkedin.com/groups?about=&gid=1300277

[rspec-users] Cucumber: Group Given, Whens and Thens

2008-11-20 Thread aidy lewis
Hi, Do you think this is a satisfactory way to group step files related to one feature e.g. publish_content_givens publish_content_whens publish_content_thens ? Thanks Aidy ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/

Re: [rspec-users] Cucumber, Webrat and http basic auth

2008-11-20 Thread Josh Knowles
On Thu, Nov 20, 2008 at 10:15 AM, Chris Flipse <[EMAIL PROTECTED]> wrote: > I ended up patching webrat to avoid the post_via_redirect rails methods, and > had to implement a version of follow_redirects that takes headers as an > argument. I've refactored the way that redirects are handled in Rails

Re: [rspec-users] Cucumber, Webrat and http basic auth

2008-11-20 Thread Chris Flipse
Yes. I've actually had to patch webrat (behind a firewall, unfortunately) to deal with this. Havn't had a chance to actually extract from the firewall. It's not actually Webrat's fault, at least from what I've managed to uncover. The problem lies within the Rails integration tests; specifically

Re: [rspec-users] Cucumber, Webrat and http basic auth

2008-11-20 Thread Andrew Premdas
Don't know if this is related, but webrat 0.3.4 introduced a bug with redirecting which I reported at http://webrat.lighthouseapp.com/projects/10503/tickets/67 Wonder if your problem happens with webrat 0.2? 2008/11/20 aslak hellesoy <[EMAIL PROTECTED]>: > On Thu, Nov 20, 2008 at 2:52 PM, kwe <

Re: [rspec-users] LinkedIn Group

2008-11-20 Thread Joseph Wilk
aslak hellesoy wrote: On Thu, Nov 20, 2008 at 2:28 PM, Rahoul Baruah <[EMAIL PROTECTED]> wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20 Nov 2008, at 13:18, Ashley Moran wrote: On Nov 20, 2008, at 12:20 pm, aslak hellesoy wrote: Ashley Moran has already created an

Re: [rspec-users] Cucumber, Webrat and http basic auth

2008-11-20 Thread aslak hellesoy
On Thu, Nov 20, 2008 at 2:52 PM, kwe <[EMAIL PROTECTED]> wrote: > Yes, using latest webrat and cucumber, basic_auth is working for the > initial steps, just not for the redirect that follows a successful > 'page' creation i.e. > > redirect_to(admin_page_path(@page)) > > In a Rails sense. > Sorry -

Re: [rspec-users] Cucumber, Webrat and http basic auth

2008-11-20 Thread kwe
Yes, using latest webrat and cucumber, basic_auth is working for the initial steps, just not for the redirect that follows a successful 'page' creation i.e. redirect_to(admin_page_path(@page)) In a Rails sense. On Nov 20, 11:11 am, "aslak hellesoy" <[EMAIL PROTECTED]> wrote: > On Thu, Nov 20, 2

Re: [rspec-users] LinkedIn Group

2008-11-20 Thread aslak hellesoy
On Thu, Nov 20, 2008 at 2:28 PM, Rahoul Baruah <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > On 20 Nov 2008, at 13:18, Ashley Moran wrote: > >> On Nov 20, 2008, at 12:20 pm, aslak hellesoy wrote: >> >>> Ashley Moran has already created an RSpec group: >>> http:/

Re: [rspec-users] specifying which button webrat should press

2008-11-20 Thread Andrew Premdas
I did something similar with Scenario: Cart shows item price and total price Given there is a product with name foo and price £24.50 And I am on the products page When I add product with name foo to cart And a step matcher When /^I add product with name (.*) to cart$/ do |name| p

Re: [rspec-users] LinkedIn Group

2008-11-20 Thread Rahoul Baruah
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20 Nov 2008, at 13:18, Ashley Moran wrote: On Nov 20, 2008, at 12:20 pm, aslak hellesoy wrote: Ashley Moran has already created an RSpec group: http://www.linkedin.com/groups?about=&gid=1300277 Only has one member yet though! I've joined.

Re: [rspec-users] LinkedIn Group

2008-11-20 Thread Ashley Moran
On Nov 20, 2008, at 12:20 pm, aslak hellesoy wrote: Ashley Moran has already created an RSpec group: http://www.linkedin.com/groups?about=&gid=1300277 Only has one member yet though! Why don't you create a BDD group, Erik? Make sure you let the BDD google group know anout it: http://groups

Re: [rspec-users] LinkedIn Group

2008-11-20 Thread aslak hellesoy
On Thu, Nov 20, 2008 at 11:57 AM, Erik Terpstra <[EMAIL PROTECTED]> wrote: > I really like the idea of LinkedIn BDD and RSpec groups. > Is somebody of the core team willing to create these? > Ashley Moran has already created an RSpec group: http://www.linkedin.com/groups?about=&gid=1300277 Why do

Re: [rspec-users] LinkedIn Group

2008-11-20 Thread Erik Terpstra
I really like the idea of LinkedIn BDD and RSpec groups. Is somebody of the core team willing to create these? --Erik Ashley Moran wrote: On Nov 14, 2008, at 12:27 pm, Matt Wynne wrote: What about abstracting it a level and making it a BDD group? The 'Outside In' Club. Or something. :) The

Re: [rspec-users] Cucumber, Webrat and http basic auth

2008-11-20 Thread aslak hellesoy
On Thu, Nov 20, 2008 at 11:32 AM, kwe <[EMAIL PROTECTED]> wrote: > Starting out with Cucumber and webrat and seem to be hitting a problem > with a resource protected with http basic auth. > > i.e. > > The following feature.. > > Feature: Manage Pages > In order to add a reference pages > As a adm

[rspec-users] Cucumber, Webrat and http basic auth

2008-11-20 Thread kwe
Starting out with Cucumber and webrat and seem to be hitting a problem with a resource protected with http basic auth. i.e. The following feature.. Feature: Manage Pages In order to add a reference pages As a administrator I want to create a page Scenario: Add a page