Sha256: bf993b9dd014cb342c9f5b4350388453c0806e2d7e0efab70e50249d5c3faf18
Contents?: true
Size: 437 Bytes
Versions: 7
Compression:
Stored size: 437 Bytes
Contents
require 'spec_helper' class DummUrlReader include UrlReader end describe UrlReader do let(:content) { File.read(File.expand_path('../test.html', __FILE__)) } let(:url) { 'http://www.example.com/test.html' } let(:read) { -> { DummUrlReader.new.read_url(url) } } describe '#read_url' do it 'should read url' do stub_request(:any, url).to_return(body: content) expect(read.call).to eq content end end end
Version data entries
7 entries across 7 versions & 1 rubygems