Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix TeamCity incompatibility #144

Merged
merged 1 commit into from

3 participants

@twobitlabs

Rspecs using webmock fail when run on TeamCity servers. This should probably be fixed on the TeamCity side, but this patch seems reasonable and works. See http://www.coding4streetcred.com/blog/post/Issue-RubyMine-31-Webmock-162-and-“Specconfigure”-curse.aspx for a more detailed explanation of what's going on.

@bblimke
Owner

Thank you for this fix! Great that defined?(Spec.configure) solves the problem.

@bblimke bblimke merged commit 8585a5d into from
@twobitlabs

Thanks for the quick version update! I've verified that it's working in TeamCity now when I include:

gem "webmock", ">= 1.7.10", :group => [:test]

in my Gemfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/webmock/rspec.rb
View
2  lib/webmock/rspec.rb
@@ -3,7 +3,7 @@
# RSpec 1.x and 2.x compatibility
if defined?(RSpec) && defined?(RSpec::Expectations)
RSPEC_NAMESPACE = RSPEC_CONFIGURER = RSpec
-elsif defined?(Spec)
+elsif defined?(Spec) && defined?(Spec.configure)
RSPEC_NAMESPACE = Spec
RSPEC_CONFIGURER = Spec::Runner
else
Something went wrong with that request. Please try again.