Re: [rspec-users] [cucumber] Cucumber and Chronic

2009-03-01 Thread Stephen Eley
On Sun, Mar 1, 2009 at 6:30 PM, Mark Wilden wrote: > On Sun, Mar 1, 2009 at 11:07 AM, Mark Wilden wrote: >> >> Just be careful when when basing durations from "now" that daylight >> savings time doesn't affect anything. > > Along the same lines, don't write tests that assume 1.month.ago was < > 2

Re: [rspec-users] testing multiple sessions in cucumber/webrat

2009-03-01 Thread Ben Mabey
Joe Van Dyk wrote: Is it possible to have a scenario where you are testing the interaction between two different session? i.e. Given User A clicks this link Then User B should see this It used to be possible, but don't know if it still is. Joe ___ r

Re: [rspec-users] Is there a way to generate spec for existing controllers?

2009-03-01 Thread Phlip
David Chelimsky wrote: ty wrote: We just start using RSpec and rspec_on_rails for a existing Rails project. No unit tests, right? After run script/generate rspec. It only generate the structure folders. We've got quite a few controllers and models. I wonder is it a way to auto-generate sp

Re: [rspec-users] testing multiple sessions in cucumber/webrat

2009-03-01 Thread Zach Dennis
On Sun, Mar 1, 2009 at 8:04 PM, Joe Van Dyk wrote: > So you're saying no?  :D It is possible, you simply have to logout from UserA and log in as UserB. Also, although it's not exposed with webrat IIRC it is possible to have selenium run to separate browsers at the same time. You could theoretical

Re: [rspec-users] Cucumber for large projects

2009-03-01 Thread James Byrne
Tom ten Thij wrote: > We will be using Cucumber for a fairly large project. Are there any > areas that cucumber is lacking when there are many scenarios? > > I believe the best candidate for showing our client the scenario > results is the html output. It strikes me that that becomes fairly > cumb

Re: [rspec-users] testing multiple sessions in cucumber/webrat

2009-03-01 Thread Joe Van Dyk
So you're saying no? :D On Sat, Feb 28, 2009 at 5:17 PM, BJ Clark wrote: > Joe, > I would test this in 2 steps. > I'd first test that whatever state change (or whatever happens when you User > A clicks the link) takes place. > Then in another test, I'd check that, given a certain state (or again

Re: [rspec-users] Is there a way to generate spec for existing controllers?

2009-03-01 Thread David Chelimsky
On Sun, Mar 1, 2009 at 7:38 AM, ty wrote: > Hi list, > > We just start using RSpec and rspec_on_rails for a existing Rails > project. > After run script/generate rspec. It only generate the structure > folders. > We've got quite a few controllers and models. I wonder is it a way to > auto-generate

[rspec-users] Is there a way to generate spec for existing controllers?

2009-03-01 Thread ty
Hi list, We just start using RSpec and rspec_on_rails for a existing Rails project. After run script/generate rspec. It only generate the structure folders. We've got quite a few controllers and models. I wonder is it a way to auto-generate specs for them. Many thanks ty

Re: [rspec-users] [cucumber] Cucumber and Chronic

2009-03-01 Thread Mark Wilden
On Sun, Mar 1, 2009 at 11:07 AM, Mark Wilden wrote: > > Just be careful when when basing durations from "now" that daylight > savings time doesn't affect anything. Along the same lines, don't write tests that assume 1.month.ago was < 29 days ago, or specs could start failing in March (as just hap

Re: [rspec-users] [Cucumber] pretty html output?

2009-03-01 Thread gcristelli
Hi Philip, I use the vim (with the tpope http://github.com/tpope/vim-cucumber/tree/master) and the command Syntax -> Convert to HTML Giovanni On 25 Feb, 17:27, Phlip wrote: > Cucumberists (and RSpec Classic users ;): > > How can we convert a Cucumber feature file into HTML with syntax highlight

Re: [rspec-users] How do you mock a local variable ?

2009-03-01 Thread David Chelimsky
Sorry all - this was sitting waiting for moderation, but it's already been addressed. Cheers, David On Thu, Feb 26, 2009 at 2:43 PM, MathLef wrote: > Hi, > > I need some help to spec' a function I am developping. Note that the > function is still not complete, cause I am trying to spec' it while

[rspec-users] Cucumber for large projects

2009-03-01 Thread Tom ten Thij
We will be using Cucumber for a fairly large project. Are there any areas that cucumber is lacking when there are many scenarios? I believe the best candidate for showing our client the scenario results is the html output. It strikes me that that becomes fairly cumbersome to check with many scenar

[rspec-users] be_valid (validates_format_of ..., :on => :create)

2009-03-01 Thread MAwiniarski
Greetings, How to write Example which will check if model's variable's format is valid using :on => :create, like this: class User < ActiveRecord::Base ... validates_format_of :email, :with => /.../, :on => :create ... Using following code is not right: it "should ..." do @user = users

[rspec-users] How do you mock a local variable ?

2009-03-01 Thread MathLef
Hi, I need some help to spec' a function I am developping. Note that the function is still not complete, cause I am trying to spec' it while working on it, as it should be ! Basically, this is what my function should look like : private def obtain_criterias(hash_params) crits = {} hash_params

[rspec-users] New blog for Ruby-based software testers - www.agilerubytester.com

2009-03-01 Thread Jim Knowlton
Hi, my name is Jim Knowlton. I'm a QA Engineer who works with Ruby and Watir (and RSpec) in the doing of my job (testing web applications). I've started a blog on my experiences and lessons learned. It is is at http://agilerubytester.com. Feel free to check it out and comment on any of the post

Re: [rspec-users] [cucumber] noob Q deleteing from a list.

2009-03-01 Thread John Ivanoff
Thanks for all the help. With the puts response.body I was able so see what was going on. I know that I am now deleting the third frooble Now when Then I should see the following froobles: I get this error -- Then I should see the following froobles: # features

Re: [rspec-users] [rails] An authorization question

2009-03-01 Thread Andrew Henson
On 28 Feb 2009, at 22:26, Chris Flipse wrote: Yes! This is what I was trying (poorly) to get at. Responsibility issues might be a large part of why it got factored this way to begin with. The global is bad. Really bad, which is why I'm trying to figure out something that works better.

[rspec-users] starting a program from ruby on windows

2009-03-01 Thread Jeff Bowen
I simply want to start another program from this GUI and let the GUI continue doing its own thing. The other program will run independent of the GUI and should stay running if the GUI is closed. require 'fox16' include Fox class ClipMainWindow < FXMainWindow def initialize(anApp) # Initial

Re: [rspec-users] [cucumber] Cucumber and Chronic

2009-03-01 Thread Mark Wilden
On Sun, Mar 1, 2009 at 8:50 AM, Tim Walker wrote: > > Now, this works fine, if you’re only testing that you can set the > clock to "Monday Jan 1, 2009 10:00". It gets more complex quickly when > you try to do much more than this. Adding chronic to the mix allows us > to define and use more complex

Re: [rspec-users] Rspecing an enumerator from outside-in woes

2009-03-01 Thread Matt Wynne
On 1 Mar 2009, at 17:30, Shot (Piotr Szotkowski) wrote: Thanks a lot, Matt, for your reply! It’s seriously most enlightening. Matt Wynne: On 28 Feb 2009, at 21:29, Shot (Piotr Szotkowski) wrote: 1. A philosophical/kosherness question: In the finished system Decomposer#each will yield Deco

[rspec-users] how to get started with cucumber and assert{ 2.0 }

2009-03-01 Thread Phlip
[Warning: The following is not a question] Cucumberists: One of the irons in my fires is learning a little Cuke. So I try an experiment: Feature: join In order to get premium content As an unregistered member I want to enter signup information for a new account Scenario: Proper signup

Re: [rspec-users] Rspecing an enumerator from outside-in woes

2009-03-01 Thread Shot (Piotr Szotkowski)
Thanks a lot, Matt, for your reply! It’s seriously most enlightening. Matt Wynne: > On 28 Feb 2009, at 21:29, Shot (Piotr Szotkowski) wrote: >> 1. A philosophical/kosherness question: In the finished system >> Decomposer#each will yield Decomposition objects, but as I’m specing >> from outside-i

[rspec-users] [cucumber] Cucumber and Chronic

2009-03-01 Thread Tim Walker
This may have been discussed before but just wanted to pass along a killer one-two punch that we stumbled upon as an excellent and natural extension to our domain language around the expression and testing of complex time based constructs. Please consider: Cucumber allows you to specify behavior

Re: [rspec-users] Rspecing an enumerator from outside-in woes

2009-03-01 Thread Matt Wynne
On 28 Feb 2009, at 21:29, Shot (Piotr Szotkowski) wrote: I’m trying to spec a system from outside-in as an excercise in ‘emergent design’ – and so far I love it; it made me think about the design for two days before I even wrote the first spec… :) Great :) My most-outside class seems to be