spec: rspec 2.13 parallelized_specs compatibility
Change-Id: I3600a84a6b7bde5bc6b25bfcd8ff448dfed4463f Reviewed-on: https://gerrit.instructure.com/28736 Reviewed-by: Bryan Madsen <bryan@instructure.com> Product-Review: Bryan Madsen <bryan@instructure.com> QA-Review: Bryan Madsen <bryan@instructure.com> Tested-by: Shawn Meredith <shawn@instructure.com>
This commit is contained in:
parent
501e760528
commit
26464cde51
18
script/spec
18
script/spec
|
@ -1,10 +1,22 @@
|
|||
#!/usr/bin/env ruby
|
||||
if ARGV.any? {|arg| %w[--drb -X --generate-options -G --help -h --version -v].include?(arg)}
|
||||
if ARGV.any? { |arg| %w[--drb -X --generate-options -G --help -h --version -v].include?(arg) }
|
||||
require 'rubygems' unless ENV['NO_RUBYGEMS']
|
||||
else
|
||||
gem 'test-unit', '1.2.3'
|
||||
ENV["RAILS_ENV"] ||= 'test'
|
||||
require File.expand_path(File.dirname(__FILE__) + "/../config/environment") unless defined?(Rails)
|
||||
end
|
||||
require 'spec/autorun'
|
||||
exit ::Spec::Runner::CommandLine.run
|
||||
|
||||
if CANVAS_RAILS2
|
||||
require 'spec/autorun'
|
||||
exit ::Spec::Runner::CommandLine.run
|
||||
else
|
||||
require 'rspec/autorun'
|
||||
#make sure ARGV which is a filelist gets flattened and passed
|
||||
#correctly this solution just runs the first file
|
||||
exit ::RSpec::Core::Runner.run(ARGV)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
require 'spec/runner/formatter/nested_text_formatter'
|
||||
if CANVAS_RAILS2
|
||||
|
||||
module RSpec
|
||||
require 'spec/runner/formatter/nested_text_formatter'
|
||||
module RSpec
|
||||
class NestedInstafailFormatter < Spec::Runner::Formatter::NestedTextFormatter
|
||||
def example_failed(example, counter, failure)
|
||||
super
|
||||
|
@ -8,4 +9,20 @@ module RSpec
|
|||
output.puts
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
require 'rspec/core/formatters/base_text_formatter'
|
||||
module RSpec
|
||||
class NestedInstafailFormatter < RSpec::Core::Formatters::BaseTextFormatter
|
||||
def example_failed(example)
|
||||
super
|
||||
#dump_failure(counter, failure)
|
||||
output.puts
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ module SeleniumTestsHelperMethods
|
|||
end
|
||||
begin
|
||||
tries ||= 3
|
||||
puts "Thread #{THIS_ENV} connecting to hub over port #{PORT_NUM}, try ##{tries}"
|
||||
puts "Thread: provisioning selenium driver"
|
||||
driver = nil
|
||||
driver = Selenium::WebDriver.for(browser, options)
|
||||
rescue Exception => e
|
||||
|
|
Loading…
Reference in New Issue