views:

90

answers:

3

We're developing a plugin for rails, and I've got Cucumber working with Capybara wonderfully. BUT, when developing, I've been (erroneously, I guess) putting the Javascript files in the parent test application's public/javascript directory. So when Capybara runs, it doesn't find the javascript file. How can we get Cucumber/Capybara to see those JS files?

A little more detail:

So the layout "reports.html.haml" refers to "src='/javascripts/...'" but when I run cucumber from within the vendor/plugins/reporter directory, Capybara doesn't find the JS files (I think). So should I be running cucumber from the application root, and including the Plugin's files, or is there some other place I need to include the JS files (for example, somewhere in the vendor/plugin/reporter hierarchy)?

Here is our current PLUGIN directory layout:

|~app/
| |~controllers/
| | `-reports_controller.rb
| |~models/
| | `-report.rb
| `~views/
|   |~layouts/
|   | `-reports.html.haml
|   `~reports/
|     |-edit.html.haml
|     |-index.html.haml
|     |-new.html.haml
|     |-show.html.haml
|     `-show.js.erb
|+autotest/
|+config/
|~features/
| |+step_definitions/
| |+support/
| `-reports.feature
|+generators/
|+lib/
|+spec/
|...