Skip to content

Instantly share code, notes, and snippets.

@eregon
Created March 14, 2012 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save eregon/24e11287c604137eb565 to your computer and use it in GitHub Desktop.
Save eregon/24e11287c604137eb565 to your computer and use it in GitHub Desktop.
RSpec.configure do |config|
config.treat_symbols_as_metadata_keys_with_true_values = true
config.before(:each, :skip_vcr_reset => lambda { |v| puts; p v; v != true }) do
p :before_hook
end
end
describe "Test" do
it 'ex1' do
p :ex1
end
it 'ex2', :skip_vcr_reset do
p :ex2
end
it 'ex3' do
p :ex3
end
end
$ bundle exec rspec -f doc rspec_before_exclusion_filter.rb # with 155e200 reverted
Test
nil
:before_hook
:ex1
ex1
true
nil
:before_hook
:ex2
ex2
nil
:before_hook
:ex3
ex3
Finished in 0.00082 seconds
3 examples, 0 failures
Randomized with seed 16648
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment