Skip to content

Instantly share code, notes, and snippets.

@corporealfunk
Forked from justinko/gist:812278
Created March 13, 2012 01:28

Revisions

  1. @justinko justinko revised this gist Feb 5, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    RSpec.configure do |config|
    config.filter_run_excluding :remote => true
    config.before(:each, :remote => true) do
    config.before :each, :remote => true do
    # Configure code to hit the Braintree service
    end
    end
  2. @justinko justinko created this gist Feb 5, 2011.
    31 changes: 31 additions & 0 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    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