Sha256: 1adae3dc7b792f63926c4942ffedd2aed0181c81ee3c521aaa90e2cbf5da9d30
Contents?: true
Size: 1.58 KB
Versions: 1
Compression:
Stored size: 1.58 KB
Contents
module Rspec module Core class Runner def self.installed_at_exit? @installed_at_exit ||= false end def self.autorun return if installed_at_exit? @installed_at_exit = true at_exit { new.run(ARGV) ? exit(0) : exit(1) } end def configuration Rspec.configuration end def reporter configuration.formatter end def require_all_files(configuration) configuration.files_to_run.map {|f| require f } end def run(args = []) Rspec::Core::CommandLineOptions.parse(args).apply(configuration) require_all_files(configuration) configuration.configure_mock_framework total_examples_to_run = Rspec::Core.world.total_examples_to_run old_sync, reporter.output.sync = reporter.output.sync, true if reporter.output.respond_to?(:sync=) suite_success = true reporter_supports_sync = reporter.output.respond_to?(:sync=) old_sync, reporter.output.sync = reporter.output.sync, true if reporter_supports_sync reporter.start(total_examples_to_run) # start the clock start = Time.now Rspec::Core.world.example_groups_to_run.each do |example_group| suite_success &= example_group.run(reporter) end reporter.start_dump(Time.now - start) reporter.dump_failures reporter.dump_summary reporter.dump_pending reporter.close reporter.output.sync = old_sync if reporter_supports_sync suite_success end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rspec-core-2.0.0.beta.5 | lib/rspec/core/runner.rb |