I am writing a book in Rails 3 at the moment and the past - I wrote in chapter 3 or so that when a certain function is executed, a routing error is created. Now, unlike me, I write things that are not true, so I'm sure that this happened in the past.
I have not yet been able to play the script myself, but I am sure that this is one of the forgotten settings in the environment file.
To duplicate this problem:
- Create a new rails project
- important : delete the file
public/index.html - Add the cucumber rails and capybara to the "test" group in the
Gemfile - run
bundle install - run
rails g cucumber:skeleton - Create a new function, name it
features/creating_projects.feature - Inside this function is put:
It:
Feature: Creating projects In order to value As a role I want feature Scenario: title Given I am on the homepage
When you run this function with bundle exec cucumber features/creating_projects.feature , it should fail with the error "No routes matched /" because you did not determine the root route. However, what I and others are observing is that it is not.
Now I have set a parameter in test.rb that will display this exception page, but I would prefer that Rails make a hard raise for the exception, so that it appears in Cucumber as an unsuccessful step, for example, I'm pretty sure it was, and not a step behind step.
Does anyone know what could have changed since last May for Rails to not do this? I am pretty sure that this is a setting in config/environments/test.rb , but for life I can not understand.
source share