spec/spec_helper.rb in ohai-7.2.0.alpha.0 vs spec/spec_helper.rb in ohai-7.2.0.rc.0

- old
+ new

@@ -1,15 +1,17 @@ require 'rspec' +require 'rspec/collection_matchers' # require 'pry-debugger' # require 'pry-stack_explorer' $:.unshift(File.expand_path("../..", __FILE__)) $:.unshift(File.dirname(__FILE__) + '/../lib') require 'spec/support/platform_helpers' require 'spec/support/integration_helper' +require 'wmi-lite' require 'ohai' Ohai::Config[:log_level] = :error PLUGIN_PATH = File.expand_path("../../lib/ohai/plugins", __FILE__) SPEC_PLUGIN_PATH = File.expand_path("../data/plugins", __FILE__) @@ -82,10 +84,20 @@ end end end RSpec.configure do |config| - config.treat_symbols_as_metadata_keys_with_true_values = true + + config.raise_errors_for_deprecations! + + # `expect` should be preferred for new tests or when refactoring old tests, + # but we're not going to do a "big bang" change at this time. + config.expect_with :rspec do |c| + c.syntax = [:should, :expect] + end + config.mock_with :rspec do |c| + c.syntax = [:expect, :should] + end config.filter_run :focus => true config.filter_run_excluding :windows_only => true unless windows? config.filter_run_excluding :unix_only => true unless unix?