Re: [rspec-users] Comparing files

2010-12-10 Thread Josh Chisholm
On Fri, Dec 10, 2010 at 4:30 PM, George Dinwiddie wrote: > Matt, > > On 12/10/10 9:56 AM, Matt Wynne wrote: >> >> Hello folks, >> >> I'm writing some tests for file upload code. The files are binary, >> images mostly. I'm futzing around a bit, trying to figure out how to >> assert that the uploade

Re: [rspec-users] [cucumber] Features with multipl e user iterations ¿?

2009-01-22 Thread Josh Chisholm
> Would you avoid the brittleness that "clicks submit link|button" has over "I > submit". There are often many ways of submitting on the same page. So to avoid tying "I submit" to a particular scenario, I tend to use "I click 'submit'", which doesn't correspond to a link or button specifically, b

Re: [rspec-users] Cucumber ENV setting in env.rb

2009-01-23 Thread Josh Chisholm
We are setting environment variables in our Rakefile. We have various tasks that set up environment variables, then call the cucumber task. That's working for us under windows. On Thu, Jan 22, 2009 at 7:21 PM, James Byrne wrote: > James Byrne wrote: > >> >> When I run rake features this works exa

Re: [rspec-users] [Cucumber] Level of features / Feature dependent steps

2009-02-18 Thread Josh Chisholm
I find that the _first_ example of some functionality should be imperative (say specifically how to achieve something step by step) and subsequent mentions of the same functionality should be more declarative (say in abstract terms what to achieve, but spare the step by step details). For me, this

Re: [rspec-users] Cucumber - Adding a step definition

2009-03-14 Thread Josh Chisholm
> That sounds like a great way to avoid the instance variable. Why is a named record preferable to an instance variable? It seems like the coupling between steps is the same, but the coupled state is stored differently. Maybe that's the point - stored differently. I've been tempted to start scena

Re: [rspec-users] Cucumber - Adding a step definition

2009-03-15 Thread Josh Chisholm
On Sun, Mar 15, 2009 at 1:18 AM, Matt Wynne wrote: > > On 15 Mar 2009, at 00:30, Josh Chisholm wrote: > >>> That sounds like a great way to avoid the instance variable. >> >> Why is a named record preferable to an instance variable? It seems >> like the coup

[rspec-users] [Cucumber] World { nil } causes undefined method `exception=' in backtraces from steps called from other steps

2009-03-31 Thread Josh Chisholm
We were using the following style of setting up a world: World do def a_helper ... end end I don't know where I came up with that. I now realise we should have been returning a world class here, but the above style seems to be supported. Is it? Anyway, we got away with it so far. And it

Re: [rspec-users] [Cucumber] World { nil } causes undefined method `exception=' in backtraces from steps called from other steps

2009-03-31 Thread Josh Chisholm
Great. Thanks! 2009/3/31 aslak hellesoy : > > > On Tue, Mar 31, 2009 at 11:34 AM, Josh Chisholm > wrote: >> >> We were using the following style of setting up a world: >> >> World do >>  def a_helper >>    ... >>  end >> end >>

Re: [rspec-users] Step matchers

2007-10-16 Thread Josh Chisholm
Hi all. I'm with David in that plain-text specs are my holy grail. I have actually been experimenting with this idea since I first saw the story runner. My interpreter (spike!) would execute "specs" against "proofs", but I tried to put a bit more into the grammar. Specifically, the interpreter woul

Re: [rspec-users] Step matchers

2007-10-16 Thread Josh Chisholm
This isn't in production, it's not even fully baked. It's just something I hacked away at over a couple of weekends. I can show you where I wanted to get to (off the top of my head) : http://pastie.caboo.se/107693 ( adapted from http://evang.eli.st/blog/2007/9/1/user-stories-with-rspec-s-story-ru

Re: [rspec-users] BDD / cucumber thought - chaining 'Then' steps with Which

2008-09-26 Thread Josh Chisholm
Stories without shared state feel clunky to me, because we would never speak that way. I also had a similar urge, don't know if it's a "programmer" urge: Given a user With the name 'josh' And the password 'sesame' ...so I don't end up with an explosion of steps for 'a user with x', 'a user with y