Re: [rspec-users] Stories - Use view matchers rather than assigns[].should?

2008-04-10 Thread Kamal Fariz
> When I create a user with foo="bar" > > is better because it doesn't expose the implementation. Just the > model concept and any relevant attributes. I hide model details from Stories by using webrat and form field labels. When I create a user with Username: kamal, Password: test And click sub

Re: [rspec-users] Command line story runner

2008-04-04 Thread Kamal Fariz
Hi Kyle, I tried the story runner against a story. Unfortunately, it had problems executing webrat methods like 'visits'. Kindly check out this pastie: http://pastie.org/175204 I tried running it with the normal ruby wrapper and it works fine. Regards, Kamal _

Re: [rspec-users] Command line story runner

2008-04-03 Thread Kamal Fariz
> It sucks to write wrapper .rb files just so stories/all.rb can find > and run them. Very nice. I was considering moving over to the Rubyesque stories so that I don't have to have .story files around and the wrapper like you mentioned. The wrapper is the story. http://continuousthinking.com/

Re: [rspec-users] Re ducing frequency of autotest file checks

2008-02-15 Thread Kamal Fariz
> You can reduce the frequency at which autotest checks for changes on > your > file system by adding an initialize hook in your ~/.autotest > configuration: If you are running Leopard, you might be interested in a hack a co- worker of mine used to tame autotest. He replaced autotest's pollin

[rspec-users] Autotest setup to run Story Runner?

2008-02-14 Thread Kamal Fariz
Has anyone looked at hooking up the Story Runner to Autotest? Currently, the autotest hooks that rspec uses explicitly runs ./script/ spec, which when pointed to a story runner file doesn't do anything. (In fact, the generated spec.opts has an incompatible --format option - changing progress

Re: [rspec-users] Failed specs spike autotest

2008-02-14 Thread Kamal Fariz
> Same thing happening here, though I didn't recognize that it's only > after failures. The problem continues whether I use .autotest files or > not. > > This is on a Rails 2.0.2 project, with rspec+rspec_on_rails r3306 in > vendor/plugins, and ZenTest 3.9.1 installed as a gem. I got this too, bu

Re: [rspec-users] DRYing up stories

2008-01-24 Thread Kamal Fariz
> With 1.1.1 you can do this: > > Given "$n_users in the system" do |num_users| > case num_users > when "a user" ># one user case > when /(\d*) users/ ># multi user case using $1 > end > end > > With 1.1.2 you can do this: > > Given /(a|\d*) users? in the system/ do |num_users| > num_u

Re: [rspec-users] DRYing up stories

2008-01-23 Thread Kamal Fariz
Slightly OT, but what can be done to DRY up steps? For aesthetics and more natural sounding stories, I often have things like Given a user in the system and Given 2 users in the system where the small change is in the pluralization. What I currently do is to have two steps that essentially