cucumber / cucumber-rails

Rails Generators for Cucumber with special support for Capybara and DatabaseCleaner
https://github.com/cucumber/cucumber-rails
MIT License
1.02k stars 327 forks source link

Configure Rails annotations via environment config (Rails 6+) #511

Closed orien closed 3 years ago

orien commented 3 years ago

Summary

Fix rails notes support by adding config to config/environments/development.rb and config/environments/test.rb for Rails 6+ projects..

Context

As per #510, the config generated via rails generate cucumber:install does not support rails notes for Rails 6+.

By changing the annotate feature to exercise rails notes rather than rake notes the problem is exposed.

Change

Update the install generator so when rails generate cucumber:install is run the existing Rake-based annotation configuration is only generated for projects running versions of Rails pre v6.0. When running Rails v6.0 or greater, add configuration to the Rails development and test environment configuration files.

How Has This Been Tested?

This is covered in both RSpec and Cucumber tests.

Types of changes

Checklist

luke-hill commented 3 years ago

This explains a lot (I was getting the rake notes test failing locally!)