Module: Flatware::RSpec
- Defined in:
- lib/flatware/rspec.rb,
lib/flatware/rspec/formatter.rb,
lib/flatware/rspec/checkpoint.rb,
lib/flatware/rspec/job_builder.rb,
lib/flatware/rspec/marshalable.rb,
lib/flatware/rspec/formatters/console.rb,
lib/flatware/rspec/marshalable/example.rb,
lib/flatware/rspec/marshalable/example_group.rb,
lib/flatware/rspec/marshalable/execution_result.rb,
lib/flatware/rspec/marshalable/profile_notification.rb,
lib/flatware/rspec/marshalable/summary_notification.rb,
lib/flatware/rspec/marshalable/examples_notification.rb,
lib/flatware/rspec/marshalable/deprecation_notification.rb,
lib/flatware/rspec/marshalable/shared_group_inclusion_backtrace.rb
Defined Under Namespace
Modules: Formatters, Marshalable
Classes: Checkpoint, Formatter, JobBuilder, ProgressMessage
Class Method Summary
collapse
Class Method Details
14
15
16
|
# File 'lib/flatware/rspec.rb', line 14
def (args, workers:)
JobBuilder.new(args, workers: workers).jobs
end
|
.output_stream ⇒ Object
24
25
26
27
28
29
30
|
# File 'lib/flatware/rspec.rb', line 24
def output_stream
StringIO.new.tap do |output|
output.define_singleton_method(:tty?) do
$stdout.tty?
end
end
end
|
.run(job, _options = []) ⇒ Object
32
33
34
35
36
37
38
39
|
# File 'lib/flatware/rspec.rb', line 32
def run(job, _options = [])
::RSpec.configuration.deprecation_stream = StringIO.new
::RSpec.configuration.output_stream = output_stream
::RSpec.configuration.add_formatter(Flatware::RSpec::Formatter)
runner.run(Array(job), $stderr, $stdout)
::RSpec.reset end
|
.runner ⇒ Object
18
19
20
21
22
|
# File 'lib/flatware/rspec.rb', line 18
def runner
::RSpec::Core::Runner.tap do |runner|
def runner.trap_interrupt() end
end
end
|