Rails 3 + Cucumber, won't recognize steps

31 views
Skip to first unread message

JeanM

unread,
Jul 28, 2010, 9:26:54 AM7/28/10
to pickle
Hi, I'm having some troubles getting Cucumber + Pickle + factory_girl
to work using Ruby 1.9.2dev + Rails 3.0.0.rc, I hope anyone can help
me out.

I've added the following steps:

Scenario: Show webpage
Given webpage exists with title: "Index"
When I go to the show webpage for that page
Then I should see "Index" within "h1"

When running Cucumber, I get:


1 scenario (1 undefined)
3 steps (2 skipped, 1 undefined)
0m0.496s

You can implement step definitions for undefined steps with these
snippets:

Given /^webpage exists with title: "([^"]*)"$/ do |arg1|
pending # express the regexp above with the code you wish you had
end




So it's not loading the pickle added steps, but when I copy over the
required step inside pickle_steps.rb to my_steps.rb it still won't
recognize it, how can this be?:



# create n models
Given(/^(\d+) #{capture_plural_factory} exist(?: with
#{capture_fields})?$/) do |count, plural_factory, fields|
count.to_i.times { create_model(plural_factory.singularize,
fields) }
end

Jason Bucki

unread,
Jul 28, 2010, 3:58:09 PM7/28/10
to pickle
Have you created a factory/blueprint for that model? If not, that
should take care of it.

- Jason

Jason Bucki

unread,
Jul 28, 2010, 4:03:18 PM7/28/10
to pickle
Have you created a factory/blueprint for that model? If not, that
should take care of it.

- Jason

On Jul 28, 8:26 am, JeanM <j.me...@live.nl> wrote:

Ian White

unread,
Jul 30, 2010, 8:04:45 AM7/30/10
to pickle-...@googlegroups.com
Hi group,

I'm on holidays until next week. At that point I shall apply myself to the pickle backlog.

Cheers,
Ian

Sent from my iPhone

> --
> You received this message because you are subscribed to the Google Groups "pickle" group.
> To post to this group, send email to pickle-...@googlegroups.com.
> To unsubscribe from this group, send email to pickle-cucumb...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pickle-cucumber?hl=en.
>

Ian White

unread,
Aug 1, 2010, 5:18:43 AM8/1/10
to pickle
Did Jason's suggestion do the trick for you?

Cheers,
Ian
Reply all
Reply to author
Forward
0 new messages