diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-11-27 13:56:41 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-12-21 18:02:10 +0100 |
commit | f48c16cdc9ad3e48c242eeb210db558c3100539a (patch) | |
tree | 2fb6b6f8aa856e0401484efa1ab943690be2b9e8 | |
parent | 71a64a2903876338c5bba5cc4843451377cf99d5 (diff) | |
download | bundler-f48c16cdc9ad3e48c242eeb210db558c3100539a.tar.gz |
Verify no un-mocked requests are being made in the specs
-rw-r--r-- | spec/support/helpers.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb index 2f399052f2..3912ad068f 100644 --- a/spec/support/helpers.rb +++ b/spec/support/helpers.rb @@ -93,7 +93,9 @@ module Spec end requires = options.delete(:requires) || [] - requires << File.expand_path("../artifice/" + options.delete(:artifice) + ".rb", __FILE__) if options.key?(:artifice) + if artifice = options.delete(:artifice) { "fail" unless RSpec.current_example.metadata[:realworld] } + requires << File.expand_path("../artifice/#{artifice}.rb", __FILE__) + end requires << "support/hax" requires_str = requires.map {|r| "-r#{r}" }.join(" ") |