generators/rspec/templates/spec_helper.rb in howitzer-1.0.2 vs generators/rspec/templates/spec_helper.rb in howitzer-1.1.0
- old
+ new
@@ -1,33 +1,32 @@
require 'rspec'
require 'capybara/rspec'
require_relative '../boot'
+Dir[File.join(File.dirname(__FILE__), 'support', '**', '*.rb')].each{ |f| require f }
+
RSpec.configure do |config|
log.settings_as_formatted_text
DataStorage.store('sauce', :start_time, Time.now.utc)
DataStorage.store('sauce', :status, true)
config.include Capybara::Settings
config.include Capybara::RSpecMatchers
config.include DataGenerator
- config.mock_with(:rspec){|c| c.syntax = :expect}
- config.expect_with(:rspec) { |c| c.syntax = :expect }
+ config.disable_monkey_patching = true
+ config.color = true
- config.color_enabled = true
- config.treat_symbols_as_metadata_keys_with_true_values = true
-
config.before(:all) do
if sauce_driver?
- suite_name = "#{(ENV['RAKE_TASK'] || 'CUSTOM').sub("rspec:", '').upcase} #{settings.sl_browser_name.upcase}"
+ suite_name = "#{(ENV['RAKE_TASK'] || 'CUSTOM').sub('rspec:', '').upcase} #{settings.sl_browser_name.upcase}"
Capybara.drivers[:sauce][].options[:desired_capabilities][:name] = suite_name
end
end
config.before(:each) do
- log.print_scenario_name(example.description.empty? ? example.metadata[:full_description] : example.description)
+ log.print_scenario_name(RSpec.current_example.description.empty? ? RSpec.current_example.metadata[:full_description] : RSpec.current_example.description)
@session_start = duration(Time.now.utc - DataStorage.extract('sauce', :start_time))
end
config.after(:each) do
DataStorage.clear_all_ns