using pickle 0.2.1, I have trouble using its path methods. I have
models called "dancer" and "performance" and I have several cucumber
features in which I use pickle to access factories and create models.
However, when I try to use one of the routes to figure out a path,
something goes wrong:
When I go to the dancers
page
# test/integration/step_definitions/web_steps.rb:22
undefined method `new_performance_path' for class
`ActionController::Integration::Session' (NameError)
./test/integration/support/paths.rb:38:in `send'
./test/integration/support/paths.rb:38:in `path_to'
./test/integration/step_definitions/web_steps.rb:23:in `/^(?:|
I )go to (.+)$/'
test/integration/features/admin/admin.feature:8:in `When I go to
the dancers page'
I checked... "new_performance" is available as a route.
Anyone got any ideas? What more info can I provide?
Thx
Stephan
All I can think of is:
1) check your routes using rake routes and checking there is one for
new_performance (are they nested BTW?)
2) check that the models exist
3) check that the controllers exist
What is the relationship between dancer and performance and is there
any fancy stuff going on?
Cheers,
Michael.
thanks for your comment. It led me to recognize what my problem was: I
am using Translator (http://github.com/graysky/translator) to create
internationalized paths. Because I had problems with translator and
routes in my other tests I had included the Translator routes line as
such:
unless RAILS_ENV == 'test'
ActionController::Routing::Translator.translate_from_file 'config/
locales', 'i18n-routes.yml'
end
What I didn't realize up until now is that this doesn't cover cucumber
tests, as they run in their own environment...
I still would like to have Translator working in my tests, but I can
now say, that it is definetly not a pickle/cucumber issue.
Stephan
thanks for your comment. It led me to recognize what my problem was: I
am using Translator (http://github.com/graysky/translator) to create
internationalized paths. Because I had problems with translator and
routes in my other tests I had included the Translator routes line as
such:
unless RAILS_ENV == 'test'
ActionController::Routing::Translator.translate_from_file 'config/
locales', 'i18n-routes.yml'
end
What I didn't realize up until now is that this doesn't cover cucumber
tests, as they run in their own environment...
I still would like to have Translator working in my tests, but I can
now say, that it is definetly not a pickle/cucumber issue.
Stephan
On Feb 10, 2:57 pm, schlick <mich...@starclass.com.au> wrote:
http://github.com/graysky/translator/issues#issue/12
Stephan