Skip to content

Instantly share code, notes, and snippets.

@toolmantim
Last active March 31, 2017 20:08
Show Gist options
  • Save toolmantim/2a1d73fd2f8cca15f38255995af035a2 to your computer and use it in GitHub Desktop.
Save toolmantim/2a1d73fd2f8cca15f38255995af035a2 to your computer and use it in GitHub Desktop.

Knapsack Pro Queue Mode Capybara Screenshot Bug Test

Recreates the Capybara Screenshot bug.

Note: this can be fixed by switching to mattheworiordan/capybara-screenshot#205

-gem 'capybara-screenshot'
+gem 'capybara-screenshot', git: 'https://github.com/ArturT/capybara-screenshot.git',
+                           branch: 'fix-reporter_module-loaded-twice'

Running locally

git clone https://gist.github.com/2a1d73fd2f8cca15f38255995af035a2.git knapsack-pro-capybara-screenshot-bug-test
cd knapsack-pro-capybara-screenshot-bug-test

bundle install

export KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC="xxx"
export KNAPSACK_PRO_REPOSITORY_ADAPTER=git
export KNAPSACK_PRO_CI_NODE_TOTAL=2

# Whichever one of these two commands runs two specs will show the error
env KNAPSACK_PRO_CI_NODE_INDEX=0 ./tests.sh
env KNAPSACK_PRO_CI_NODE_INDEX=1 ./tests.sh

Running locally with Docker

git clone https://gist.github.com/2a1d73fd2f8cca15f38255995af035a2.git knapsack-pro-capybara-screenshot-bug-test
cd knapsack-pro-capybara-screenshot-bug-test

export KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC="xxx"
export KNAPSACK_PRO_REPOSITORY_ADAPTER=git
export KNAPSACK_PRO_CI_NODE_TOTAL=2

# Whichever one of these two commands runs two specs will show the error
env KNAPSACK_PRO_CI_NODE_INDEX=0 docker-compose run app ./tests.sh
env KNAPSACK_PRO_CI_NODE_INDEX=1 docker-compose run app ./tests.sh

You can run this all in the one container also:

docker-compose run app bash
root@9ab279817bf3#:/app# env KNAPSACK_PRO_CI_NODE_INDEX=0 docker-compose run app ./tests.sh
root@9ab279817bf3#:/app# env KNAPSACK_PRO_CI_NODE_INDEX=1 docker-compose run app ./tests.sh

Running on Buildkite

  • Make sure you're running a 3.x Buildkite Agent.
  • Create a pipeline with repository https://gist.github.com/2a1d73fd2f8cca15f38255995af035a2.git and a single step containing buildkite-agent pipeline upload buildkite-pipeline.yml
  • Run a build
  • Whichever step runs two specs will show the error

Expected Error

15:45 $ docker-compose build && docker-compose run app ./tests.sh
Building app
Step 1/6 : FROM ruby:latest
 ---> 9de00c83e1f1
Step 2/6 : RUN apt-get update -yqq   && apt-get install -fyqq curl libfontconfig1 libfreetype6   && curl -LO https://s3.amazonaws.com/shortstack-assets/phantomjs-2.1.1-linux-x86_64.tar.bz2   && bzcat phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar xf -   && mv phantomjs-2.1.1-linux-x86_64 /opt/phantomjs-2.1.1   && ln -s /opt/phantomjs-2.1.1 /opt/phantomjs   && ln -s /opt/phantomjs/bin/phantomjs /usr/local/bin/phantomjs   && rm phantomjs-2.1.1-linux-x86_64.tar.bz2
 ---> Using cache
 ---> fb05f227b429
Step 3/6 : WORKDIR /app
 ---> Using cache
 ---> e203f061d305
Step 4/6 : ADD Gemfile Gemfile.lock /app/
 ---> Using cache
 ---> 0c065b48670b
Step 5/6 : RUN bundle install
 ---> Using cache
 ---> f29fef0ed677
Step 6/6 : ADD . /app/
 ---> Using cache
 ---> 525db3425c31
Successfully built 525db3425c31
+++ :rspec: Running specs
I, [2017-03-31T04:45:18.927350 #6]  INFO -- : [knapsack_pro] API request UUID: 1624d220-20e2-40ed-bc42-f0cd24226aee
I, [2017-03-31T04:45:18.927483 #6]  INFO -- : [knapsack_pro] API response:
I, [2017-03-31T04:45:18.927645 #6]  INFO -- : [knapsack_pro] {"queue_name"=>"195:80dd1e84f335637500c08c9549c59c7c", "build_subset_id"=>nil, "test_files"=>[{"path"=>"failing_2_spec.rb", "time_execution"=>nil}]}
I, [2017-03-31T04:45:18.927835 #6]  INFO -- : [knapsack_pro] To retry in development the subset of tests fetched from API queue please run below command on your machine. If you use --order random then remember to add proper --seed 123 that you will find at the end of rspec command.
I, [2017-03-31T04:45:18.927909 #6]  INFO -- : [knapsack_pro] bundle exec rspec --default-path *_spec.rb failing_2_spec.rb
I, [2017-03-31T04:45:19.151349 #6]  INFO -- : [knapsack_pro] Test suite time execution queue recording enabled.
F  HTML screenshot: file://tmp/capybara/screenshot_2017-03-31-04-45-21.649.html
  Image screenshot: file://tmp/capybara/screenshot_2017-03-31-04-45-21.649.png
I, [2017-03-31T04:45:21.732778 #6]  INFO -- : [knapsack_pro] Global time execution for tests: 0s


Failures:

  1) Knapsack Pro queue mode #2 fails nicely w/ capybara-screenshot
     Failure/Error: expect(page).to have_content 'Non-existent content'
       expected to find text "Non-existent content" in "Hello World"
     # ./failing_2_spec.rb:8:in `block (2 levels) in <top (required)>'
     # /usr/local/bundle/gems/knapsack_pro-0.30.0/lib/knapsack_pro/runners/queue/rspec_runner.rb:42:in `run_tests'
     # /usr/local/bundle/gems/knapsack_pro-0.30.0/lib/knapsack_pro/runners/queue/rspec_runner.rb:17:in `run'
     # /usr/local/bundle/gems/knapsack_pro-0.30.0/lib/tasks/queue/rspec.rake:6:in `block (3 levels) in <top (required)>'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/task.rb:250:in `block in execute'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/task.rb:250:in `each'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:152:in `invoke_task'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:108:in `each'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:108:in `block in top_level'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:117:in `run_with_threads'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:102:in `top_level'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:80:in `block in run'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
     # /usr/local/bundle/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'

Finished in 2.53 seconds (files took 3.32 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./failing_2_spec.rb:4 # Knapsack Pro queue mode #2 fails nicely w/ capybara-screenshot

I, [2017-03-31T04:45:27.003025 #6]  INFO -- : [knapsack_pro] API request UUID: b4600cf2-378b-402e-948a-3859a5c3b3ae
I, [2017-03-31T04:45:27.004054 #6]  INFO -- : [knapsack_pro] API response:
I, [2017-03-31T04:45:27.004167 #6]  INFO -- : [knapsack_pro] {"queue_name"=>"195:80dd1e84f335637500c08c9549c59c7c", "build_subset_id"=>nil, "test_files"=>[{"path"=>"failing_3_spec.rb", "time_execution"=>nil}]}
I, [2017-03-31T04:45:27.004300 #6]  INFO -- : [knapsack_pro] To retry in development the subset of tests fetched from API queue please run below command on your machine. If you use --order random then remember to add proper --seed 123 that you will find at the end of rspec command.
I, [2017-03-31T04:45:27.004386 #6]  INFO -- : [knapsack_pro] bundle exec rspec --default-path *_spec.rb failing_3_spec.rb
I, [2017-03-31T04:45:29.247694 #6]  INFO -- : [knapsack_pro] Global time execution for tests: 0s


Failures:

  1) Knapsack Pro queue mode #2 fails nicely w/ capybara-screenshot
     Failure/Error: expect(page).to have_content 'Non-existent content'
       expected to find text "Non-existent content" in "Hello World"
     # ./failing_2_spec.rb:8:in `block (2 levels) in <top (required)>'
     # /usr/local/bundle/gems/knapsack_pro-0.30.0/lib/knapsack_pro/runners/queue/rspec_runner.rb:42:in `run_tests'
     # /usr/local/bundle/gems/knapsack_pro-0.30.0/lib/knapsack_pro/runners/queue/rspec_runner.rb:17:in `run'
     # /usr/local/bundle/gems/knapsack_pro-0.30.0/lib/tasks/queue/rspec.rake:6:in `block (3 levels) in <top (required)>'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/task.rb:250:in `block in execute'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/task.rb:250:in `each'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:152:in `invoke_task'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:108:in `each'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:108:in `block in top_level'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:117:in `run_with_threads'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:102:in `top_level'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:80:in `block in run'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
     # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
     # /usr/local/bundle/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'

  2) Knapsack Pro queue mode #3 fails nicely w/ capybara-screenshot
     Got 1 failure and 1 other error:

     2.1) Failure/Error: expect(page).to have_content 'Non-existent content'
            expected to find text "Non-existent content" in "Hello World"
          # ./failing_3_spec.rb:8:in `block (2 levels) in <top (required)>'
          # /usr/local/bundle/gems/knapsack_pro-0.30.0/lib/knapsack_pro/runners/queue/rspec_runner.rb:42:in `run_tests'
          # /usr/local/bundle/gems/knapsack_pro-0.30.0/lib/knapsack_pro/runners/queue/rspec_runner.rb:46:in `run_tests'
          # /usr/local/bundle/gems/knapsack_pro-0.30.0/lib/knapsack_pro/runners/queue/rspec_runner.rb:17:in `run'
          # /usr/local/bundle/gems/knapsack_pro-0.30.0/lib/tasks/queue/rspec.rake:6:in `block (3 levels) in <top (required)>'
          # /usr/local/bundle/gems/rake-12.0.0/lib/rake/task.rb:250:in `block in execute'
          # /usr/local/bundle/gems/rake-12.0.0/lib/rake/task.rb:250:in `each'
          # /usr/local/bundle/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
          # /usr/local/bundle/gems/rake-12.0.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
          # /usr/local/bundle/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
          # /usr/local/bundle/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke'
          # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:152:in `invoke_task'
          # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
          # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:108:in `each'
          # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:108:in `block in top_level'
          # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:117:in `run_with_threads'
          # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:102:in `top_level'
          # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:80:in `block in run'
          # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
          # /usr/local/bundle/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
          # /usr/local/bundle/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'

     2.2) Failure/Error: example_failed_without_screenshot notification

          SystemStackError:
            stack level too deep
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
          # /usr/local/bundle/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec/text_reporter.rb:22:in `example_failed_with_screenshot'
steps:
- command: 'tests.sh'
label: ':knapsack:'
parallelism: 2
artifact_paths: 'screenshots/*'
plugins:
docker-compose#v1.0:
run: app
version: '2'
services:
app:
build: '.'
volumes:
- './tmp/capybara:/app/tmp/capybara'
environment:
- CI
- KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC
- BUILDKITE_PARALLEL_JOB
- BUILDKITE_PARALLEL_JOB_COUNT
- BUILDKITE_COMMIT
- BUILDKITE_BRANCH
- BUILDKITE_REPO
- BUILDKITE_BUILD_ID
- BUILDKITE_BUILD_NUMBER
# For local Knapsack testing
- KNAPSACK_PRO_REPOSITORY_ADAPTER
- KNAPSACK_PRO_CI_NODE_TOTAL
- KNAPSACK_PRO_CI_NODE_INDEX
FROM ruby:latest
# Install PhantomJS
RUN apt-get update -yqq \
&& apt-get install -fyqq curl libfontconfig1 libfreetype6 \
&& curl -LO https://s3.amazonaws.com/shortstack-assets/phantomjs-2.1.1-linux-x86_64.tar.bz2 \
&& bzcat phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar xf - \
&& mv phantomjs-2.1.1-linux-x86_64 /opt/phantomjs-2.1.1 \
&& ln -s /opt/phantomjs-2.1.1 /opt/phantomjs \
&& ln -s /opt/phantomjs/bin/phantomjs /usr/local/bin/phantomjs \
&& rm phantomjs-2.1.1-linux-x86_64.tar.bz2
WORKDIR /app
ADD Gemfile Gemfile.lock /app/
RUN bundle install
ADD . /app/
require_relative 'spec_helper'
RSpec.describe 'Knapsack Pro queue mode #1', type: :feature, js: true do
it 'fails nicely w/ capybara-screenshot' do
visit "/"
expect(page.status_code).to eql(200)
expect(page).to have_content 'Non-existent content'
end
end
require_relative 'spec_helper'
RSpec.describe 'Knapsack Pro queue mode #2', type: :feature, js: true do
it 'fails nicely w/ capybara-screenshot' do
visit "/"
expect(page.status_code).to eql(200)
expect(page).to have_content 'Non-existent content'
end
end
require_relative 'spec_helper'
RSpec.describe 'Knapsack Pro queue mode #3', type: :feature, js: true do
it 'fails nicely w/ capybara-screenshot' do
visit "/"
expect(page.status_code).to eql(200)
expect(page).to have_content 'Non-existent content'
end
end
source "https://rubygems.org"
gem 'rake'
gem 'rspec'
gem 'capybara'
gem 'capybara-screenshot'
gem 'poltergeist'
gem 'knapsack_pro'
GEM
remote: https://rubygems.org/
specs:
addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2)
capybara (2.13.0)
addressable
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
capybara-screenshot (1.0.14)
capybara (>= 1.0, < 3)
launchy
cliver (0.3.2)
diff-lcs (1.3)
equatable (0.5.0)
knapsack_pro (0.30.0)
rake
timecop (>= 0.1.0)
tty-prompt (~> 0.7)
launchy (2.4.3)
addressable (~> 2.3)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
necromancer (0.4.0)
nokogiri (1.7.1)
mini_portile2 (~> 2.1.0)
pastel (0.7.1)
equatable (~> 0.5.0)
tty-color (~> 0.4.0)
poltergeist (1.14.0)
capybara (~> 2.1)
cliver (~> 0.3.1)
websocket-driver (>= 0.2.0)
public_suffix (2.0.5)
rack (2.0.1)
rack-test (0.6.3)
rack (>= 1.0)
rake (12.0.0)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-core (3.5.4)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
timecop (0.8.1)
tty-color (0.4.2)
tty-cursor (0.4.0)
tty-prompt (0.12.0)
necromancer (~> 0.4.0)
pastel (~> 0.7.0)
tty-cursor (~> 0.4.0)
wisper (~> 1.6.1)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
wisper (1.6.1)
xpath (2.0.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
capybara
capybara-screenshot
knapsack_pro
poltergeist
rake
rspec
BUNDLED WITH
1.14.6
require 'knapsack_pro'
KnapsackPro.load_tasks
require 'knapsack_pro'
require 'capybara/rspec'
require 'capybara-screenshot/rspec'
require 'capybara/poltergeist'
Capybara.default_driver = :poltergeist
Capybara.javascript_driver = :poltergeist
Capybara.save_path = "tmp/capybara"
Capybara.app = Rack::Builder.new do
map "/" do
run Proc.new {|env| [200, {'Content-Type' => 'text/html'}, ['<html><body>Hello World</body></html>']]}
end
end.to_app
KnapsackPro::Adapters::RSpecAdapter.bind
#!/bin/bash
set -euo pipefail
echo "+++ :rspec: Running specs"
export KNAPSACK_PRO_TEST_FILE_PATTERN='*_spec.rb'
export KNAPSACK_PRO_PROJECT_DIR="$(pwd)"
bundle exec rake knapsack_pro:queue:rspec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment