Class: JasmineParser::JasmineSuite

Inherits:
Object
  • Object
show all
Defined in:
lib/jasmine-parser/jasmine_suite.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeJasmineSuite

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_filesObject (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_countObject



53
54
55
# File 'lib/jasmine-parser/jasmine_suite.rb', line 53

def example_count
  location_finder.example_count
end

#example_namesObject



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