Skip to content

Commit

Permalink
Add support for :focus tests to spec helper
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsdeleo committed Dec 4, 2013
1 parent 409aaf4 commit cb483cb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,17 @@ def from_file(filename)
RSpec.configure do |config|
config.treat_symbols_as_metadata_keys_with_true_values = true

config.filter_run :focus => true

config.filter_run_excluding :windows_only => true unless windows?
config.filter_run_excluding :unix_only => true unless unix?
config.filter_run_excluding :ruby_18_only => true unless ruby_18?
config.filter_run_excluding :ruby_19_only => true unless ruby_19?
config.filter_run_excluding :requires_root => true unless ENV['USER'] == 'root'
config.filter_run_excluding :requires_unprivileged_user => true if ENV['USER'] == 'root'

config.run_all_when_everything_filtered = true

config.before :each do
Ohai::Config.reset
end
Expand Down

0 comments on commit cb483cb

Please sign in to comment.