Thanks Doug
That did the trick, and I can have different lists of fields for create and
update if I want. I will see if there's a cast or two I can look at as well.
As an aside, I quite often write rspec code like this:
[:name,:description,:price,:interest_group_id].each do |column|
it "should require column #{column}" do
@item[column] = nil
@item.should_not be_valid
end
end
Obviously the before is resetting @item.
But cucumber for me is about the application-level behaviour that you could
share with a reasonably savvy user so I want it to look like something I
could share without taking days to explain it.
+10
Thanks and regards,
Francis
Follow me on twitter https://twitter.com/fjfish
Blog at http://www.francisfish.com
(you can also buy my books from there!)
Skype: fjfish
My other sig is much funnier and world changing but I can't find it anywhere
On Wed, Dec 30, 2009 at 4:00 PM, doug livesey <[email protected]> wrote:
> Maybe look at Ast::Tables?
> http://wiki.github.com/aslakhellesoy/cucumber/multiline-step-arguments
> You can write something like
>
> Then I can edit the following fields:
> | field_1 |
> | field_2 |
> | field_3 |
>
> HTH,
> Doug.
>
> 2009/12/30 Francis Fish <[email protected]>
>
>> Hi all
>>
>> I'm using cucumber to help me write the specifications for a project,
>> rather than write a formal use case / user story document.
>>
>> I've got a copy of the Rspec book[1] and it's only OK, doesn't seem to go
>> deep enough for me. Is there any resource online or talk that people have
>> given that actually has enough meat on it to go past what's basically an
>> extended hello world tutorial that looks like it was knocked together in an
>> afternoon (sorry if it's your baby, but I need more)?
>>
>> Maybe I'm asking too much of it
>>
>> Given I am logged in as an admin user
>> And I am in the blah area
>> When I select edit blah
>> Then I will see the edit blah screen
>>
>> Then I want to be able to create some way of saying I can edit a field or
>> fields of a blah.
>>
>> I've created something like this:
>>
>> Scenario Outline: create blah details
>> Given I am logged in as a creator
>> And I am creating a blah
>> Then I can input the value of <field>
>>
>> Scenarios: blah fields
>> | field |
>> | Name |
>> | Description |
>>
>> It just seems a little primitive and repetitive for something that's on
>> release 10 or so and the linking of named artefacts ever so slightly opaque
>> and magic spell. I want to put all of this in one description, basically all
>> the CRUD and index stuff without having to repeat myself over and over
>> again.
>>
>> [1] http://pragprog.com/titles/achbd/the-rspec-book
>>
>> Thanks and regards,
>>
>> Francis
>>
>> Follow me on twitter https://twitter.com/fjfish
>> Blog at http://www.francisfish.com
>> (you can also buy my books from there!)
>> Skype: fjfish
>>
>> My other sig is much funnier and world changing but I can't find it
>> anywhere
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "NWRUG" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<nwrug-members%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/nwrug-members?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "NWRUG" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<nwrug-members%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nwrug-members?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"NWRUG" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nwrug-members?hl=en.