Class: TestRun::Tests::Minitest::Wrappers::SingleRoot
- Inherits:
-
Object
- Object
- TestRun::Tests::Minitest::Wrappers::SingleRoot
- Defined in:
- lib/test_run/tests/minitest/wrappers/single_root.rb
Instance Attribute Summary collapse
-
#files ⇒ Object
readonly
Returns the value of attribute files.
-
#shell ⇒ Object
readonly
Returns the value of attribute shell.
Instance Method Summary collapse
- #app_root ⇒ Object
-
#initialize(files, shell) ⇒ SingleRoot
constructor
A new instance of SingleRoot.
- #to_command ⇒ Object
Constructor Details
#initialize(files, shell) ⇒ SingleRoot
Returns a new instance of SingleRoot.
11 12 13 14 |
# File 'lib/test_run/tests/minitest/wrappers/single_root.rb', line 11 def initialize(files, shell) @shell = shell @files = files.map {|f| f.is_a?(SingleFile) ? f : SingleFile.new(f)} end |
Instance Attribute Details
#files ⇒ Object (readonly)
Returns the value of attribute files.
9 10 11 |
# File 'lib/test_run/tests/minitest/wrappers/single_root.rb', line 9 def files @files end |
#shell ⇒ Object (readonly)
Returns the value of attribute shell.
9 10 11 |
# File 'lib/test_run/tests/minitest/wrappers/single_root.rb', line 9 def shell @shell end |
Instance Method Details
#app_root ⇒ Object
20 21 22 |
# File 'lib/test_run/tests/minitest/wrappers/single_root.rb', line 20 def app_root files.first.app_root end |
#to_command ⇒ Object
16 17 18 |
# File 'lib/test_run/tests/minitest/wrappers/single_root.rb', line 16 def to_command %{cd #{app_root} && ruby -I test -e 'ARGV.each { |file| require(Dir.pwd + "/" + file) }' #{files.map(&:relative_test_path).join(" ")}} end |