Re: [rspec-users] Help with regexp in matcher

2009-01-13 Thread James Byrne
Thanks for all the advise and corrections. I ended up with this: When /\bsee a (?:log|sign)(?: ?)[io]n success message/ do # login | log in | logon | log on | signin ... Then "see the login ok message" end As to the issue of whether this is being too clever by half: Perhaps. I have to consi

Re: [rspec-users] Cucumber newbie gets Webrat::Se ssion (LoadError)

2009-01-13 Thread James Byrne
Tom Hoen wrote: > > Any advice you can give would be greatly appreciated. > > Tom What are the contents of features/support/env.rb? Do you have something like this in there? # If webrat is a gem then uncomment this require 'webrat' if !defined?(Webrat) # If webrat is a plugin then uncomment

Re: [rspec-users] Help with regexp in matcher

2009-01-13 Thread Mark Wilden
On Tue, Jan 13, 2009 at 7:41 AM, James Byrne wrote: > > Logins are a pervasive feature of this application and so, rather than > waste effort on policing the feature syntax, I thought it best just to > accommodate the likely variations from the start. Premature flexibility is one of the roots o

Re: [rspec-users] Cucumber newbie gets Webrat::Se ssion (LoadError)

2009-01-13 Thread Tom Hoen
James Byrne wrote: > > What are the contents of features/support/env.rb? Do you have something > like this in there? > > # If webrat is a gem then uncomment this > require 'webrat' if !defined?(Webrat) > > # If webrat is a plugin then uncomment this > #require 'webrat/rails' Though there isn

[rspec-users] Cucumber newbie gets Webrat::Se ssion (LoadError)

2009-01-13 Thread Tom Hoen
Just trying to get cucumber/webrat going and so after following the installation process here http://wiki.github.com/aslakhellesoy/cucumber/ruby-on-rails i wrote a quick feature and when I rake features, I get the following in the console: c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/active

Re: [rspec-users] Help with regexp in matcher

2009-01-13 Thread aslak hellesoy
On Tue, Jan 13, 2009 at 6:14 PM, Mark Wilden wrote: > On Tue, Jan 13, 2009 at 7:41 AM, James Byrne wrote: > >> >> Logins are a pervasive feature of this application and so, rather than >> waste effort on policing the feature syntax, I thought it best just to >> accommodate the likely variations

[rspec-users] [Cucumber] - default rake task

2009-01-13 Thread aidy lewis
Hi, I have a Rake problem. I would like the default task to run after :features. Curently it doesn't when :features fails. Could you please help? require 'cucumber/rake/task' def send_dcs_email_report(path_to_story_results) ### end Cucumber::Rake::Task.new("features", "All features in IE"

Re: [rspec-users] Help with regexp in matcher

2009-01-13 Thread Stephen Eley
On Tue, Jan 13, 2009 at 10:41 AM, James Byrne wrote: > > Logins are a pervasive feature of this application Which is exactly why you should standardize. If you try to be accommodating toward unclear communication, you're just going to create confusion when people need to get things done. Someon

Re: [rspec-users] [Cucumber] - default rake task

2009-01-13 Thread Matt Wynne
On 13 Jan 2009, at 18:02, aidy lewis wrote: Hi, I have a Rake problem. I would like the default task to run after :features. Curently it doesn't when :features fails. Could you please help? require 'cucumber/rake/task' def send_dcs_email_report(path_to_story_results) ### end Cucumber::

Re: [rspec-users] [Cucumber] - default rake task

2009-01-13 Thread aidy lewis
On 13/01/2009, Matt Wynne wrote: > > On 13 Jan 2009, at 18:02, aidy lewis wrote: > > > > Hi, > > > > I have a Rake problem. > > > > I would like the default task to run after :features. > > > > Curently it doesn't when :features fails. Could you please help? > > > > > > > > require 'cucumber/rak

Re: [rspec-users] [Cucumber] - default rake task

2009-01-13 Thread aslak hellesoy
On Tue, Jan 13, 2009 at 7:02 PM, aidy lewis wrote: > Hi, > > I have a Rake problem. > > I would like the default task to run after :features. > > Curently it doesn't when :features fails. Could you please help? > > > > require 'cucumber/rake/task' > > def send_dcs_email_report(path_to_story_resul

Re: [rspec-users] Help with regexp in matcher

2009-01-13 Thread Matt Wynne
On 13 Jan 2009, at 17:14, Mark Wilden wrote: On Tue, Jan 13, 2009 at 7:41 AM, James Byrne wrote: Logins are a pervasive feature of this application and so, rather than waste effort on policing the feature syntax, I thought it best just to accommodate the likely variations from the start. P

Re: [rspec-users] Help with regexp in matcher

2009-01-13 Thread James Byrne
Matt Wynne wrote: . > > +1 to all that. I feel like you get lectured quite a bit by this list > James, but you'd do well to heed the advice of some battle-hardened > journeymen, IMO. > > I do hope that I do not give the impression that I resent anything that anyone has written in response to my

Re: [rspec-users] Help with regexp in matcher

2009-01-13 Thread Zach Dennis
On Tue, Jan 13, 2009 at 12:55 PM, Matt Wynne wrote: > > On 13 Jan 2009, at 17:14, Mark Wilden wrote: > >> On Tue, Jan 13, 2009 at 7:41 AM, James Byrne wrote: >> >> Logins are a pervasive feature of this application and so, rather than >> waste effort on policing the feature syntax, I thought it b

Re: [rspec-users] Help with regexp in matcher

2009-01-13 Thread James Byrne
Stephen Eley wrote: > On Tue, Jan 13, 2009 at 10:41 AM, James Byrne > wrote: >> >> Logins are a pervasive feature of this application > > Which is exactly why you should standardize. If you try to be > accommodating toward unclear communication, you're just going to > create confusion when peop

[rspec-users] Using has_selector to identify responses.

2009-01-13 Thread James Byrne
This is more of a "best practices" question. Earlier, when I was trying to understand what it was I was supposed to be testing with cucumber, I was advised that I should test for text elements contained in the response body of the expected output. Now, what I am wondering is how one accounts for

Re: [rspec-users] Using has_selector to identify responses.

2009-01-13 Thread Pat Maddox
On Tue, Jan 13, 2009 at 1:11 PM, James Byrne wrote: > This is more of a "best practices" question. > > Earlier, when I was trying to understand what it was I was supposed to > be testing with cucumber, I was advised that I should test for text > elements contained in the response body of the expec

Re: [rspec-users] Using has_selector to identify responses.

2009-01-13 Thread aslak hellesoy
On Tue, Jan 13, 2009 at 10:11 PM, James Byrne wrote: > This is more of a "best practices" question. > I'll describe a practice that has worked well for me. (I stopped believing in best practices several years ago :-)) > Earlier, when I was trying to understand what it was I was supposed to > b

Re: [rspec-users] Constraints / Global requirements

2009-01-13 Thread Andrew Premdas
2009/1/8 Zach Dennis > On Thu, Jan 8, 2009 at 11:32 AM, Steve Molitor > wrote: > > I guess that would work. > > What would work? You top-posted, any way you can inline post to the > spot you're responding to? Sorry to be an email nazi, but you're > making me do all of the work for wanting to hop

[rspec-users] Testing Sub-domains with Cucumber

2009-01-13 Thread Tom Hoen
My site uses sub-domains to create a context for the user. In my tests, I need to stipulate what domain is being used, to test whether the context is correct for the given user. But I cannot find if and where i can change the request.host value, if indeed, that is what I need to change. When I sa

Re: [rspec-users] Constraints / Global requirements

2009-01-13 Thread Zach Dennis
On Tue, Jan 13, 2009 at 4:32 PM, Andrew Premdas wrote: > > 2009/1/8 Zach Dennis >> >> On Thu, Jan 8, 2009 at 11:32 AM, Steve Molitor >> wrote: >> > I guess that would work. >> >> What would work? You top-posted, any way you can inline post to the >> spot you're responding to? Sorry to be an emai

Re: [rspec-users] Constraints / Global requirements

2009-01-13 Thread Alex Satrapa
On 14/01/2009, at 09:17 , Zach Dennis wrote: The only recommendation I have is for people to not remove the portion of the email they are responding to, and to keep their response close in approximation to what they are responding to. A: Because it messes up the order in which people normally