Class: JasmineParser::JasmineSuite
- Inherits:
-
Object
- Object
- JasmineParser::JasmineSuite
- Defined in:
- lib/jasmine-parser/jasmine_suite.rb
Instance Attribute Summary collapse
-
#spec_files ⇒ Object
readonly
Returns the value of attribute spec_files.
Instance Method Summary collapse
- #add_spec_file(file_object) ⇒ Object
- #example_count ⇒ Object
- #example_names ⇒ Object
- #find_spec_location(spec_description) ⇒ Object (also: #[])
-
#initialize ⇒ JasmineSuite
constructor
A new instance of JasmineSuite.
Constructor Details
#initialize ⇒ JasmineSuite
Returns a new instance of JasmineSuite.
36 37 38 |
# File 'lib/jasmine-parser/jasmine_suite.rb', line 36 def initialize @spec_files = [] end |
Instance Attribute Details
#spec_files ⇒ Object (readonly)
Returns the value of attribute spec_files.
35 36 37 |
# File 'lib/jasmine-parser/jasmine_suite.rb', line 35 def spec_files @spec_files end |
Instance Method Details
#add_spec_file(file_object) ⇒ Object
40 41 42 |
# File 'lib/jasmine-parser/jasmine_suite.rb', line 40 def add_spec_file(file_object) @spec_files << file_object end |
#example_count ⇒ Object
53 54 55 |
# File 'lib/jasmine-parser/jasmine_suite.rb', line 53 def example_count location_finder.example_count end |
#example_names ⇒ Object
57 58 59 |
# File 'lib/jasmine-parser/jasmine_suite.rb', line 57 def example_names location_finder.test_names end |
#find_spec_location(spec_description) ⇒ Object Also known as: []
44 45 46 47 48 49 |
# File 'lib/jasmine-parser/jasmine_suite.rb', line 44 def find_spec_location(spec_description) spec_description = spec_description.strip return location_finder.all_examples[spec_description] if location_finder.all_examples[spec_description] Announcer.warning("Could not find the location for this example name\n'#{spec_description}'") nil end |