features/support/env.rb in katapult-0.2.0 vs features/support/env.rb in katapult-0.3.0
- old
+ new
@@ -3,16 +3,24 @@
# Make sure tests use the correct katapult gem
ENV['KATAPULT_GEMFILE_OPTIONS'] = ", path: '../../..'"
Aruba.configure do |config|
- config.exit_timeout = 30 # Todo: decrease to ~5
+ config.exit_timeout = 5
end
-Before do
- unset_bundler_env_vars # Don't use katapult's Bundler environment inside tests
+Before do |scenario|
+ # Don't reuse the Bundler environment of *katapult* during tests
+ bundler_env_keys = aruba.environment.keys.grep /^BUNDLE/
+ bundler_env_keys.each &method(:delete_environment_variable)
+
run_simple 'spring stop # Ensure Spring is not running'
+
+ scenario_tags = scenario.source_tag_names
+ @no_clobber = scenario_tags.include? '@no-clobber'
end
After do
+ # Spring doesn't like loosing its working directory. Since the test app
+ # directory is clobbered between runs, we stop Spring after each run.
run_simple 'spring stop'
end