Class: Omnitest::Command::Show
- Includes:
- Omnitest::Core::FileSystem, Omnitest::Core::Util::String, Reporters
- Defined in:
- lib/omnitest/command/show.rb
Overview
rubocop:disable Metrics/ClassLength
Constant Summary
Constants included from Reporters
Reporters::ASSETS_DIR, Reporters::GENERATORS_DIR, Reporters::RESOURCES_DIR
Instance Method Summary collapse
Methods included from Reporters
Methods inherited from Base
Constructor Details
This class inherits a constructor from Omnitest::Command::Base
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/omnitest/command/show.rb', line 10 def call @indent_level = 0 setup @reporter = Omnitest::Reporters.reporter([:format], shell) scenarios = parse_subcommand(args.shift, args.shift) scenarios.each do | scenario | status_color = scenario.status_color.to_sym status(scenario.slug, colorize(scenario.status_description, status_color), status_color) indent do status('Test suite', scenario.suite) status('Test scenario', scenario.name) status('Project', scenario.psychic.name) source_file = if scenario.code_sample Core::FileSystem.relativize(scenario.absolute_source_file, Dir.pwd) else colorize('<No code sample>', :red) end status('Source', source_file) display_source(scenario) display_execution_result(scenario) display_validations(scenario) display_spy_data(scenario) end end end |