Re: [rspec-users] stubbing Time.zone.now for model tests fails for Rails 2.3.1

2009-03-11 Thread Stephen Eley
On Wed, Mar 11, 2009 at 1:40 PM, David Schmidt wrote: > > Has anyone else run into this problem and come up with a solution to getting > a fixed time back from Time.zone.now? This plugin has worked very well for me: http://github.com/notahat/time_travel/tree/master -- Have Fun, Steve Eley (

Re: [rspec-users] [cucumber] open source projects with cucumber features

2009-03-11 Thread Matt Wynne
On 11 Mar 2009, at 19:46, Zach Dennis wrote: On Wed, Mar 11, 2009 at 3:03 PM, Balint Erdi wrote: Hi, I was looking for some "real-world" cucumber features (mainly on github) to see how more complex features are built but I have not really found any. Could you point me to some? What k

Re: [rspec-users] [cucumber] getting scenario name in hook

2009-03-11 Thread Tim Walker
That did the trick. Thanks Aslak! Took a little while to figure out where it was in the Scenario object but it was pretty straight forward from there. T On Wed, Mar 11, 2009 at 10:21 AM, aslak hellesoy wrote: > > > On Wed, Mar 11, 2009 at 4:12 PM, Tim Walker wrote: >> >> Hi Guys, >> >> If I am

Re: [rspec-users] [cucumber] open source projects with cucumber features

2009-03-11 Thread Oliver Barnes
+1 I'm also looking for examples... I've seen several authentication-related ones, but very few examples of features that users would actually care a lot about, and that would help in learning outside-in development... 2009/3/11 Andrew Premdas : > You could have a look at fbrp on github, which has

Re: [rspec-users] [cucumber] open source projects with cucumber features

2009-03-11 Thread Rich Morin
At 20:03 +0100 3/11/09, Balint Erdi wrote: > I was looking for some "real-world" cucumber features (mainly > on github) to see how more complex features are built but I > have not really found any. Could you point me to some? I asked about this on #github. Lenary helped out massively. Procedure

Re: [rspec-users] Presentation Testing and CSS ids

2009-03-11 Thread Andrew Premdas
The key phrase is semantic meaning. Its good to use CSS to give semantic meaning to things that appear on web pages. Not only can these id's or classes be useful for using with screen readers, they should be stable things that don't change even if the design of the page does. It should be easy to s

Re: [rspec-users] [cucumber] open source projects with cucumber features

2009-03-11 Thread Andrew Premdas
You could have a look at fbrp on github, which has rewritten features for RestfulAuthentication. Hopefully its a reasonably gentle introduction and at least a bit real world. 2009/3/11 Balint Erdi > Hi, > > I was looking for some "real-world" cucumber features (mainly on github) > to see how mo

Re: [rspec-users] [cucumber] open source projects with cucumber features

2009-03-11 Thread Zach Dennis
On Wed, Mar 11, 2009 at 3:03 PM, Balint Erdi wrote: > Hi, > > I was looking for some "real-world" cucumber features (mainly on github) > to see how more complex features are built but I have not really found > any. Could you point me to some? For seeing different ways to utilize scenarios and ste

[rspec-users] [cucumber] open source projects with cucumber features

2009-03-11 Thread Balint Erdi
Hi, I was looking for some "real-world" cucumber features (mainly on github) to see how more complex features are built but I have not really found any. Could you point me to some? Thank you, Balint -- Posted via http://www.ruby-forum.com/. ___ rspec-u

[rspec-users] [cucumber] accessing session variables

2009-03-11 Thread Balint Erdi
Hey, I have the following simple scenario and the step definitions: Scenario: Create album Given I am logged in as "pepito" When I go to my profile page ... Given /^the user (.*) exists$/ do |login_name| User.find_by_login(login_name) || Factory(:user_with_password, :login => login_name)

[rspec-users] How to dummy a DB adapter?

2009-03-11 Thread James Byrne
I am writing a library module to handle certain StatementInvalid type AR exceptions. I wish to catch the case where the db adapter in use is not supported by the module. I would like to test this situation and have only a vague idea as to how to proceed. My exception handling method selects the

Re: [rspec-users] stubbing Time.zone.now for model tests fails for Rails 2.3.1

2009-03-11 Thread David Chelimsky
On Wed, Mar 11, 2009 at 12:40 PM, David Schmidt wrote: > Our application has some code to schedule recurring tasks, with code to skip > holidays and weekends. > > In order to test the schedule model we need to have a fixed time returned > when the model is run so that the tests will run the same n

[rspec-users] stubbing Time.zone.now for model tests fails for Rails 2.3.1

2009-03-11 Thread David Schmidt
Our application has some code to schedule recurring tasks, with code to skip holidays and weekends. In order to test the schedule model we need to have a fixed time returned when the model is run so that the tests will run the same no matter what day they are run. (The first set of tests w

Re: [rspec-users] [cucumber] getting scenario name in hook

2009-03-11 Thread aslak hellesoy
On Wed, Mar 11, 2009 at 4:12 PM, Tim Walker wrote: > Hi Guys, > > If I am generating diagnostics from a before do step can I get the > name of the scenario? > This is implemented in 0.1.99.x: http://rspec.lighthouseapp.com/projects/16211-cucumber/tickets/44 Aslak > > Many thanks, > > Tim > __

[rspec-users] [cucumber] getting scenario name in hook

2009-03-11 Thread Tim Walker
Hi Guys, If I am generating diagnostics from a before do step can I get the name of the scenario? Many thanks, Tim ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] [rspec, rails] Restful Routes in controller specs

2009-03-11 Thread Andi Schacke
Thanks a lot David, my question was 'how' they are for free. That explains why I didn't find it in the rspec-rails sourcecode. Cheers Andi On Mar 11, 2:39 pm, David Chelimsky wrote: > On Wed, Mar 11, 2009 at 3:30 AM, Andi Schacke > > wrote: > > Hi, > > > how is it possible that I can use the re

Re: [rspec-users] [rspec, rails] Restful Routes in controller specs

2009-03-11 Thread Jonathan Linowes
On Mar 11, 2009, at 4:30 AM, Andi Schacke wrote: Hi, how is it possible that I can use the restful routes helpers (e.g. new_user_path) in controller specs? I browsed the source code but I couldn't find the magic. I'm just curious and would appreciate any hint... thanks Andi __

Re: [rspec-users] [rspec, rails] Restful Routes in controller specs

2009-03-11 Thread David Chelimsky
On Wed, Mar 11, 2009 at 3:30 AM, Andi Schacke wrote: > Hi, > > how is it possible that I can use the restful routes helpers (e.g. > new_user_path) in controller specs? I browsed the source code but I > couldn't find the magic. I'm just curious and would appreciate any > hint... If you're asking h

[rspec-users] [rspec, rails] Restful Routes in controller specs

2009-03-11 Thread Andi Schacke
Hi, how is it possible that I can use the restful routes helpers (e.g. new_user_path) in controller specs? I browsed the source code but I couldn't find the magic. I'm just curious and would appreciate any hint... thanks Andi ___ rspec-users mailing lis