Sha256: 3b7ed105d1a69602c6b2ac33c6f7b6096501e9bc4a39c7782e7253cd1bfdf697
Contents?: true
Size: 556 Bytes
Versions: 2
Compression:
Stored size: 556 Bytes
Contents
require 'rspec' require 'sinatra/base' require 'webmock/rspec' require 'ronin/web/spider/agent' RSpec.shared_context "example App" do let(:host) { 'example.com' } subject { Ronin::Web::Spider::Agent.new(host: host) } def self.app(&block) let(:app) do klass = Class.new(Sinatra::Base) klass.set :host, host klass.set :port, 80 klass.class_eval(&block) return klass end before do stub_request(:any, /#{Regexp.escape(host)}/).to_rack(app) subject.start_at("http://#{host}/") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ronin-web-spider-0.1.0.beta2 | spec/example_app.rb |
ronin-web-spider-0.1.0.beta1 | spec/example_app.rb |