Logo: Relish

  1. Sign in

Project: Compatriot 0.0.3

list_of_urls

Passing a list of URLs to Compatriot.run will visit each of them in each browser and take a screenshot.

Scenarios
List of URLs
Given
a Sinatra app named "simple_app.rb" with:
  get '/' do
    'Hello'
  end

  get '/goodbye' do
    'Goodbye'
  end
And
a file named "compatriot_urls.rb" with:
require 'compatriot'
require_relative 'simple_app'
Compatriot.app = SimpleApp
Compatriot.run(%w[
  /
  /goodbye
])
And
the directory "tmp/results" does not exist
When
I run ruby compatriot_urls.rb
Then
"tmp/results" should have 1 subdirectory
And
there should be results for 2 screenshots

Last published over 4 years ago by clnclarinet.