Commit 6dc5dab7 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Configure RSpec from within RSpec runner class

parent a5ab2a5e
......@@ -9,7 +9,6 @@ module QA
def perform(address, *files)
Runtime::Scenario.define(:gitlab_address, address)
Specs::Config.perform
##
# Perform before hooks, which are different for CE and EE
......
......@@ -9,8 +9,6 @@ require 'selenium-webdriver'
module QA
module Specs
class Config < Scenario::Template
attr_writer :address
def perform
configure_rspec!
configure_capybara!
......@@ -50,7 +48,6 @@ module QA
end
Capybara.configure do |config|
# config.app_host = @address
config.default_driver = :chrome
config.javascript_driver = :chrome
config.default_max_wait_time = 4
......
......@@ -2,16 +2,14 @@ require 'rspec/core'
module QA
module Specs
class Runner
include Scenario::Actable
def rspec(tty: false, tags: [], files: ['qa/specs/features'])
class Runner < Scenario::Template
def perform(tty: false, tags: [], files: ['qa/specs/features'])
args = []
args << '--tty' if tty
tags.to_a.each do |tag|
args << ['-t', tag.to_s]
end
args << files
args.push('--tty') if tty
tags.to_a.each { |tag| args.push(['-t', tag.to_s]) }
args.push(files)
Specs::Config.perform
RSpec::Core::Runner.run(args.flatten, $stderr, $stdout).tap do |status|
abort if status.nonzero?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment