Class: Avm::Sources::Tests::Single
- Inherits:
-
Object
- Object
- Avm::Sources::Tests::Single
- Defined in:
- lib/avm/sources/tests/single.rb
Constant Summary collapse
- MAIN_SOURCE_ID =
'#main'
Instance Method Summary collapse
- #failed? ⇒ Boolean
- #id ⇒ String
- #main? ⇒ Boolean
- #order_group ⇒ Object
- #relative_path_from_main_source ⇒ Pathname
Instance Method Details
#failed? ⇒ Boolean
21 22 23 |
# File 'lib/avm/sources/tests/single.rb', line 21 def failed? result == ::Avm::Sources::Tests::Result::FAILED end |
#id ⇒ String
26 27 28 |
# File 'lib/avm/sources/tests/single.rb', line 26 def id "#{main? ? MAIN_SOURCE_ID : relative_path_from_main_source}##{test_name}" end |
#main? ⇒ Boolean
30 31 32 |
# File 'lib/avm/sources/tests/single.rb', line 30 def main? relative_path_from_main_source.to_s == '.' end |
#order_group ⇒ Object
34 35 36 |
# File 'lib/avm/sources/tests/single.rb', line 34 def order_group main? ? 1 : 0 end |
#relative_path_from_main_source ⇒ Pathname
39 40 41 |
# File 'lib/avm/sources/tests/single.rb', line 39 def relative_path_from_main_source source.path.relative_path_from(builder.main_source.path) end |