Ahh. I missed the message below that scrolls by when you run cucumber.
WARNING: You have set Rails' config.cache_classes to false (most
likely in config/environments/cucumber.rb). This setting is known to
break Cucumber's use_transactional_fixtures method. Set
config.cache_classes to true if you want to use transactional
fixtures. For more information see
https://rspec.lighthouseapp.com/projects/16211/tickets/165
.
Can we add a similar message to the generated cucumber.rb iteself?
From: Lenny Marks <
le...@lenny.ridge.aps.org>
Subject: [PATCH] Added variation of cucumber startup warning about
config.cache_classes to generated Rails environments/cucumber.rb
---
.../cucumber/templates/cucumber_environment.rb | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/rails_generators/cucumber/templates/
cucumber_environment.rb b/rails_generators/cucumber/templates/
cucumber_environment.rb
index 7972f1c..72c3c04 100644
--- a/rails_generators/cucumber/templates/cucumber_environment.rb
+++ b/rails_generators/cucumber/templates/cucumber_environment.rb
@@ -2,7 +2,12 @@
# Edit at your own peril - it's recommended to regenerate this file
# in the future when you upgrade to a newer version of Cucumber.
-config.cache_classes = true # This must be true for Cucumber to
operate correctly!
+
+# WARNING: This setting is known to break Cucumber's
+# use_transactional_fixtures method. Set config.cache_classes
+# to true if you want to use transactional fixtures.
+# For more information see
https://rspec.lighthouseapp.com/projects/16211/tickets/165
.
+config.cache_classes = true
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
@@ -27,4 +32,4 @@ config.gem 'rspec-rails', :lib =>
false, :version => '>=1.2.9' unless Fil
<% end %>
<% if spork? -%>
config.gem 'spork', :lib => false, :version =>
'>=0.7.3' unless File.directory?(File.join(Rails.root, 'vendor/plugins/
spork'))
-<% end %>
\ No newline at end of file
+<% end %>
--
1.6.1
> --
>
> You received this message because you are subscribed to the Google
> Groups "Cukes" group.
> To post to this group, send email to
cu...@googlegroups.com.
> To unsubscribe from this group, send email to
cukes+un...@googlegroups.com
> .
> For more options, visit this group at
http://groups.google.com/group/cukes?hl=en
> .
>
>