Why is WebMock enabled by default?

783 views
Skip to first unread message

nosretep

unread,
Mar 10, 2011, 10:19:06 AM3/10/11
to webmock-users
Why is WebMock enabled by default?

It's easier to convince the team to adopt the tool if it can be
introduced and proven one step at a time.

Enabling, instead of disabling, WebMock by default is going to make
this very a hard sell.

Bartosz Blimke

unread,
Mar 11, 2011, 11:34:11 AM3/11/11
to webmoc...@googlegroups.com, nosretep
Whether it´s a good decision or not, changing this behaviour would not be backward compatible,
so it can be changed in version 2.0, not earlier.
For now, I suggest including webmock in test group, if you use bundler.
You can always allow_net_connect in webmock.

Bartosz

2011/3/10 nosretep <playe...@gmail.com>

nosretep

unread,
Mar 14, 2011, 1:14:28 PM3/14/11
to webmock-users
Doing the following (and nothing else):

Gemfile:
group :test do
gem 'webmock'
end

test.rb:
require 'webmock/rspec'
include WebMock::API
WebMock.allow_net_connect!

Effectively turned off WebMock such that requests could be made,
however, it turned a 15 minute test suite into a 1 hour test suite,
and most tests failed due to server timeouts.

I'm definitely looking forward to WebMock 2.0 :)

As I do like the idea behind this!

On Mar 11, 12:34 pm, Bartosz Blimke <bartosz.bli...@gmail.com> wrote:
> Whether it´s a good decision or not, changing this behaviour would not be
> backward compatible,
> so it can be changed in version 2.0, not earlier.
> For now, I suggest including webmock in test group, if you use bundler.
> You can always allow_net_connect in webmock.
>
> Bartosz
>
> 2011/3/10 nosretep <playersp...@gmail.com>
Reply all
Reply to author
Forward
0 new messages