Class: BotSpec::BotSpecRunner
- Inherits:
-
RSpec::Core::Runner
- Object
- RSpec::Core::Runner
- BotSpec::BotSpecRunner
- Defined in:
- lib/rspec/botspec_runner.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.run(args, err = $stderr, out = $stdout) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/rspec/botspec_runner.rb', line 12 def self.run(args, err=$stderr, out=$stdout) trap_interrupt = RSpec::Core::ConfigurationOptions.new({}) if .[:runner] .[:runner].call(, err, out) else new().run(args, err, out) end end |
Instance Method Details
#configure_rspec ⇒ Object
7 8 9 10 |
# File 'lib/rspec/botspec_runner.rb', line 7 def configure_rspec config = ::RSpec.configuration end |
#run(args, out, err) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/rspec/botspec_runner.rb', line 24 def run(args, out, err) setup(err, out) botname = args[:botname] return @configuration.reporter.exit_early(@configuration.failure_exit_code) if RSpec.world.wants_to_quit dialogs_path = args[:dialogs_path] run_specs(LoadDialogs.run_dialogs(botname, dialogs_path).map{|dialog| dialog.create_example}).tap do persist_example_statuses end end |