Class: Omnitest::Skeptic::ScenarioDefinition
- Inherits:
-
Core::Dash
- Object
- Core::Dash
- Omnitest::Skeptic::ScenarioDefinition
- Defined in:
- lib/omnitest/skeptic/scenario_definition.rb
Overview
rubocop:disable ClassLength
Instance Attribute Summary collapse
-
#full_name ⇒ Object
readonly
Returns the value of attribute full_name.
Instance Method Summary collapse
- #build(project) ⇒ Object
-
#initialize(data) ⇒ ScenarioDefinition
constructor
A new instance of ScenarioDefinition.
Constructor Details
#initialize(data) ⇒ ScenarioDefinition
Returns a new instance of ScenarioDefinition.
11 12 13 14 15 |
# File 'lib/omnitest/skeptic/scenario_definition.rb', line 11 def initialize(data) super self.vars ||= Skeptic::TestManifest::Environment.new @full_name = [suite, name].join(' :: ').freeze end |
Instance Attribute Details
#full_name ⇒ Object (readonly)
Returns the value of attribute full_name.
9 10 11 |
# File 'lib/omnitest/skeptic/scenario_definition.rb', line 9 def full_name @full_name end |
Instance Method Details
#build(project) ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/omnitest/skeptic/scenario_definition.rb', line 17 def build(project) source_file = begin file = Core::FileSystem.find_file project.basedir, name Core::FileSystem.relativize(file, project.basedir) rescue Errno::ENOENT nil end psychic = project.respond_to?(:psychic) ? project.psychic : project Scenario.new(psychic: psychic, scenario_definition: self, vars: build_vars, source_file: source_file) end |