class NoradSpecRunner::SecTest
Constants
- UNSUPPORTED_SPEC_FILE
Attributes
platform[R]
test_name[R]
tests_parent_dir[R]
Public Class Methods
new(tests_parent_dir, test_name, platform)
click to toggle source
# File lib/norad_spec_runner/sec_test.rb, line 6 def initialize(tests_parent_dir, test_name, platform) @tests_parent_dir = tests_parent_dir @test_name = test_name @platform = platform print_detection_message end
Public Instance Methods
default_test_file()
click to toggle source
# File lib/norad_spec_runner/sec_test.rb, line 25 def default_test_file UNSUPPORTED_SPEC_FILE end
suggested_test_file()
click to toggle source
# File lib/norad_spec_runner/sec_test.rb, line 21 def suggested_test_file "#{test_name}/#{platform}_spec.rb" end
suggested_test_file_exists?()
click to toggle source
# File lib/norad_spec_runner/sec_test.rb, line 17 def suggested_test_file_exists? File.exist?("#{tests_parent_dir}/#{suggested_test_file}") end
test_to_run()
click to toggle source
# File lib/norad_spec_runner/sec_test.rb, line 13 def test_to_run suggested_test_file_exists? ? suggested_test_file : default_test_file end
Private Instance Methods
print_detection_message()
click to toggle source
# File lib/norad_spec_runner/sec_test.rb, line 31 def print_detection_message platform ? puts("Platform #{platform} detected!") : puts("Unable to detect OS!") end