Class: NoradSpecRunner::SecTest
- Inherits:
-
Object
- Object
- NoradSpecRunner::SecTest
- Defined in:
- lib/norad_spec_runner/sec_test.rb
Direct Known Subclasses
Constant Summary collapse
- UNSUPPORTED_SPEC_FILE =
"#{File.(File.dirname(__FILE__))}/support/os_not_supported_spec.rb"
Instance Attribute Summary collapse
-
#platform ⇒ Object
readonly
Returns the value of attribute platform.
-
#test_name ⇒ Object
readonly
Returns the value of attribute test_name.
-
#tests_parent_dir ⇒ Object
readonly
Returns the value of attribute tests_parent_dir.
Instance Method Summary collapse
- #default_test_file ⇒ Object
-
#initialize(tests_parent_dir, test_name, platform) ⇒ SecTest
constructor
A new instance of SecTest.
- #suggested_test_file ⇒ Object
- #suggested_test_file_exists? ⇒ Boolean
- #test_to_run ⇒ Object
Constructor Details
#initialize(tests_parent_dir, test_name, platform) ⇒ SecTest
6 7 8 9 10 11 |
# 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 end |
Instance Attribute Details
#platform ⇒ Object (readonly)
Returns the value of attribute platform.
4 5 6 |
# File 'lib/norad_spec_runner/sec_test.rb', line 4 def platform @platform end |
#test_name ⇒ Object (readonly)
Returns the value of attribute test_name.
4 5 6 |
# File 'lib/norad_spec_runner/sec_test.rb', line 4 def test_name @test_name end |
#tests_parent_dir ⇒ Object (readonly)
Returns the value of attribute tests_parent_dir.
4 5 6 |
# File 'lib/norad_spec_runner/sec_test.rb', line 4 def tests_parent_dir @tests_parent_dir end |
Instance Method Details
#default_test_file ⇒ Object
25 26 27 |
# File 'lib/norad_spec_runner/sec_test.rb', line 25 def default_test_file UNSUPPORTED_SPEC_FILE end |
#suggested_test_file ⇒ Object
21 22 23 |
# File 'lib/norad_spec_runner/sec_test.rb', line 21 def suggested_test_file "#{test_name}/#{platform}_spec.rb" end |
#suggested_test_file_exists? ⇒ Boolean
17 18 19 |
# 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 ⇒ Object
13 14 15 |
# 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 |