From 78f0f9248c3330180c36c1c33effeb7ada486636 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Fri, 27 Mar 2015 12:34:22 +0000 Subject: [PATCH] Don't run screenshot test on environments without phantomjs 2.0+ --- spec/features/asciicast_spec.rb | 2 +- spec/spec_helper.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/features/asciicast_spec.rb b/spec/features/asciicast_spec.rb index e4704ac..2ac487d 100644 --- a/spec/features/asciicast_spec.rb +++ b/spec/features/asciicast_spec.rb @@ -19,7 +19,7 @@ feature "Asciicast page", :js => true do [ChunkyPNG::Color.r(color), ChunkyPNG::Color.g(color), ChunkyPNG::Color.b(color)] end - scenario 'Requesting PNG' do + scenario 'Requesting PNG', needs_phantomjs_2_bin: true do visit asciicast_path(asciicast, format: :png) expect(current_path).to match(%r{/uploads/test/asciicast/image/\d+/\w+\.png$}) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index c63f69a..9c32ef9 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -26,6 +26,7 @@ RSpec.configure do |config| config.run_all_when_everything_filtered = true config.filter_run_excluding :unstable if ENV['RSPEC_EXCLUDE_UNSTABLE'] config.filter_run_excluding :needs_terminal_bin unless File.executable?("src/terminal") + config.filter_run_excluding :needs_phantomjs_2_bin unless `phantomjs --version`[0] == '2' # Many RSpec users commonly either run the entire suite or an individual # file, and it's useful to allow more verbose output when running an