Class: TestRun::Tests::Minitest::Wrappers::SingleFile
- Inherits:
-
Struct
- Object
- Struct
- TestRun::Tests::Minitest::Wrappers::SingleFile
- Defined in:
- lib/test_run/tests/minitest/wrappers/single_file.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
Returns the value of attribute file.
Instance Method Summary collapse
Instance Attribute Details
#file ⇒ Object
Returns the value of attribute file
7 8 9 |
# File 'lib/test_run/tests/minitest/wrappers/single_file.rb', line 7 def file @file end |
Instance Method Details
#app_root ⇒ Object
13 14 15 16 17 18 |
# File 'lib/test_run/tests/minitest/wrappers/single_file.rb', line 13 def app_root exploded_path = Utils::Path.split(file) path = exploded_path[0...exploded_path.rindex("test")] File.join(path) end |
#relative_test_path ⇒ Object
20 21 22 23 24 |
# File 'lib/test_run/tests/minitest/wrappers/single_file.rb', line 20 def relative_test_path exploded_path = Utils::Path.split(file) path = exploded_path[exploded_path.rindex("test")..-1] File.join(path) end |
#to_command ⇒ Object
9 10 11 |
# File 'lib/test_run/tests/minitest/wrappers/single_file.rb', line 9 def to_command %{cd #{File.join(app_root)} && ruby -I test #{File.join(relative_test_path)}} end |