The number of stories I have is growing and I'm writing the following step
long hand in each story.
Given 'a user named', 'Andy', 'Watts' do |first_name, family_name|
@email = first_name + '@test.lan'
create_user( :first_name =>
Zach Dennis-2 wrote:
>
> I like to keep them closer to customer readable/writable myself.
>
Customer readable/writable stories are important for me too.
To that end, I would prefer inline, Option 1.
1. And "the user", "Joe", "works for", "Acme", "as a", "janitor"
2. And "the user $user works
Just realized step code is DRY across stories within the same file.
(in addition to being DRY across scenarios)
I thought it best to organize stories, each in their own separate file.
My question then is about shared step code for use in many files.
Many Thanks
Andy
--
View this message in cont
Maybe I'm slow, but I just noticed that the following code..
When 'I login'
When 'I do something else'
...will output as...
When 'I login'
And 'I do something else'
The same is true for two 'Then' steps
That is really cool!
Reusable steps and coherent English output.
- Andy
--
View this me
Maybe I'm slow, but I just noticed that the following code..
Then 'I login'
Then 'I do something else'
...will output as...
Then 'I login'
And 'I do something else'
The same is true for two 'When' steps
This may have implications for writing reusable steps.
I'm finding that 'Then' step imple
er 'Then' or a in another 'Then..And'.
Similarly, in a 'When..And' scenario, this 'And' is an Event step and is
reusable as a 'When' or in another 'When..And'.
- Andy
David Chelimsky-2 wrote:
>
> On 10/15/07, Andy Watts
Looks good.
I recently spent a lot of time looking at something similar before going
with the fixtures replacement plugin.
It gives me new_user, create_user, create_user(:first_name =>
'overriddefault' ).
Also creates records for associations where required. This is useful in
story runner, where
This is awesome!
Many thanks
- Andy
David Chelimsky-2 wrote:
>
> Thanks to discussions on this list, suggestions from many of you and a
> patch from Pat Maddox, we now have Plain Text User Stories in Story
> Runner.
>
> Read more:
>
> http://blog.davidchelimsky.net/articles/2007/10/21/story-
Hi,
Anyone know a way to traverse/query the DOM in a response?
I'm trying to write reusable story step implementations and as much as
possible want to work with the actual response from a previous GET.
As an example, I often have buttons that POST/PUT a hidden value.
My goal is a reusable step
I completely forgot about Hpricot
http://code.whytheluckystiff.net/hpricot/
Looks perfect for this.
- Andy
Andy Watts wrote:
>
> Hi,
>
> Anyone know a way to traverse/query the DOM in a response?
>
> I'm trying to write reusable story step implementations and as
Hi,
Thought this might be of interest story writers.
The mechanize plugin seems to play nice with RSpec.
The following mix of methods seems to work just fine.
I especially like the helpers for populating forms.
agent = WWW::Mechanize.new
page = agent.get 'http://www.gmail.com'
page.should have_t
ml
> but hadnt asked the question so succinctly
>
> In that thread, Pat suggests helpers like click_link and submit_form
> If you progress along these lines, please post your solution, I'm
> very interested.
>
> linoj
>
>
> On Oct 24, 2007, at 12:43 AM, And
Your routes.rb looks funky. Are you running edge rails?
It's worthwhile if you're set on restful stuff.
I don't think the name_prefix and path_prefix stuff is really necessary.
My nested routes read more like
map.resources :groups
groups.resources :admins
end
'rake routes > /tmp/route
Hi,
I've got a story working with selenium-rc, but am stuck writing ajax-aware
steps.
How are people coding their story steps to wait for an Ajax event to
complete?
Here's what I've looked at so far.
$browser.wait_for_element_present
Looks Ideal, but not in selenium-ruby-client-drivers for s
Assuming there's nothing helpful in test.log..
Adding 'debugger' to the misfiring steps may help troubleshoot this..
You'll prolly need to add the following to your helper.rb first.
require 'rubygems'
require 'ruby-debug'
Re-run the story and it should stop at the debugger.
Between manually s
15 matches
Mail list logo