Class: TestCase

Inherits:
Object
  • Object
show all
Defined in:
lib/sfb_scripts/test_running/test_case.rb

Constant Summary collapse

TestDirectoryError =
Class.new(StandardError)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(full_path: raise, test_name: '') ⇒ TestCase

Returns a new instance of TestCase.



6
7
8
9
# File 'lib/sfb_scripts/test_running/test_case.rb', line 6

def initialize(full_path: raise, test_name: '')
  @test_name = test_name
  @full_path = full_path
end

Instance Attribute Details

#full_pathObject (readonly)

Returns the value of attribute full_path.



4
5
6
# File 'lib/sfb_scripts/test_running/test_case.rb', line 4

def full_path
  @full_path
end

#relative_pathObject (readonly)

Returns the value of attribute relative_path.



4
5
6
# File 'lib/sfb_scripts/test_running/test_case.rb', line 4

def relative_path
  @relative_path
end

#test_nameObject (readonly)

Returns the value of attribute test_name.



4
5
6
# File 'lib/sfb_scripts/test_running/test_case.rb', line 4

def test_name
  @test_name
end

#working_dirObject (readonly)

Returns the value of attribute working_dir.



4
5
6
# File 'lib/sfb_scripts/test_running/test_case.rb', line 4

def working_dir
  @working_dir
end

Instance Method Details

#raise_file_path_errorObject

Raises:



24
25
26
# File 'lib/sfb_scripts/test_running/test_case.rb', line 24

def raise_file_path_error
  raise TestDirectoryError.new("Can't find test's relative path")
end