mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 13:06:56 +08:00
DEV: Support --headful
to run system test in headful mode in bin/rspec (#31815)
Having to type `SELENIUM_HEADLESS=0` everytime is annoying and hard to remember.
This commit is contained in:

committed by
GitHub

parent
e9244ebc68
commit
ca835a8952
13
bin/rspec
13
bin/rspec
@ -8,16 +8,17 @@
|
|||||||
# this file is here to facilitate running it.
|
# this file is here to facilitate running it.
|
||||||
#
|
#
|
||||||
|
|
||||||
require 'pathname'
|
require "pathname"
|
||||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", Pathname.new(__FILE__).realpath)
|
||||||
Pathname.new(__FILE__).realpath)
|
|
||||||
|
|
||||||
require 'rubygems'
|
require "rubygems"
|
||||||
require 'bundler/setup'
|
require "bundler/setup"
|
||||||
|
|
||||||
if ENV["LOAD_PLUGINS"].nil? && ARGV.any? { |pattern| pattern.include?("plugins/") }
|
if ENV["LOAD_PLUGINS"].nil? && ARGV.any? { |pattern| pattern.include?("plugins/") }
|
||||||
STDERR.puts "Detected plugin spec path, setting LOAD_PLUGINS to 1"
|
STDERR.puts "Detected plugin spec path, setting LOAD_PLUGINS to 1"
|
||||||
ENV["LOAD_PLUGINS"] = "1"
|
ENV["LOAD_PLUGINS"] = "1"
|
||||||
end
|
end
|
||||||
|
|
||||||
load Gem.bin_path('rspec-core', 'rspec')
|
ENV["SELENIUM_HEADLESS"] = "0" if ARGV.delete("--headful")
|
||||||
|
|
||||||
|
load Gem.bin_path("rspec-core", "rspec")
|
||||||
|
Reference in New Issue
Block a user