Sha256: 9bca6ced9115017c267f819a1dfd4016b9ca88816f6842c23b6e755cd066d90d

Contents?: true

Size: 411 Bytes

Versions: 2

Compression:

Stored size: 411 Bytes

Contents

module StubWithRealResponse
  def stub_with_real_response(path)
    FactoryGirl::RemoteApi.reset_configuration
    visit [config.server_mount_path, path].join
    uri = URI([config.server_url, config.server_mount_path, path].join)
    Net::HTTP.should_receive(:get_response).with(uri).and_return(stub(:response, body: page.body))
  end
end

RSpec.configure do |config|
  config.include StubWithRealResponse
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
factory_girl-remote_api-0.4.0 spec/support/stub_with_real_response.rb
factory_girl-remote_api-0.3.0 spec/support/stub_with_real_response.rb