Skip to content

Instantly share code, notes, and snippets.

@justinko
Created February 5, 2011 06:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save justinko/812278 to your computer and use it in GitHub Desktop.
Save justinko/812278 to your computer and use it in GitHub Desktop.
RSpec.configure do |config|
config.filter_run_excluding :remote => true
config.before :each, :remote => true do
# Configure code to hit the Braintree service
end
end
# Include your remote specs within your "normal" specs
describe Sweeper do
describe '.sweep!' do
it 'does not raise an error' do
expect { described_class.sweep! }.to_not raise_error
end
it 'hits the api...', :remote => true do
end
end
end
# Or, isolate them
describe Sweeper, :remote => true do
describe '.sweep!' do
it 'hits the api...' do
end
end
end
# rspec spec # doesn't run remote specs
# rspec spec --tag remote # runs only remote specs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment