It seems to happen when I run cucumber, I think because I was missing
the require 'webmock/cucumber' in cucumber's env.rb. That's how I
got it to work.
Additionally, I have a rake task that seeds data from active resource
which requires network access, it seemed that by default outside of a
testing environment the network access was still blocked (by design
via webmock). I found that putting the below along with the includes
in cucumber and rspec environments allowed everything to work
together. Hope this helps someone.
test.rb
require 'webmock/rspec'
include WebMock::API
WebMock.allow_net_connect!
On Mar 14, 10:56 am, Bartosz Blimke <
bartosz.bli...@gmail.com> wrote:
> Does it happen when you run cucumber or rspec?
>
> It's difficult to say what's causing the error, without having a sample
> failing code.
>
> webmock/rspec already includes WebMock::API, so you don't have to do that.
>
> Bartosz
>