Class: Smartest::TestCase
- Inherits:
-
Object
- Object
- Smartest::TestCase
- Defined in:
- lib/smartest/test_case.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#fixture_names ⇒ Object
readonly
Returns the value of attribute fixture_names.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:, metadata:, block:, location:) ⇒ TestCase
constructor
A new instance of TestCase.
Constructor Details
#initialize(name:, metadata:, block:, location:) ⇒ TestCase
Returns a new instance of TestCase.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/smartest/test_case.rb', line 7 def initialize(name:, metadata:, block:, location:) raise ArgumentError, "test name is required" if name.nil? || name.to_s.empty? raise ArgumentError, "test block is required" unless block @name = name.to_s @metadata = @block = block @location = location @fixture_names = ParameterExtractor.required_keyword_names(block, usage: :test) end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
5 6 7 |
# File 'lib/smartest/test_case.rb', line 5 def block @block end |
#fixture_names ⇒ Object (readonly)
Returns the value of attribute fixture_names.
5 6 7 |
# File 'lib/smartest/test_case.rb', line 5 def fixture_names @fixture_names end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
5 6 7 |
# File 'lib/smartest/test_case.rb', line 5 def location @location end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
5 6 7 |
# File 'lib/smartest/test_case.rb', line 5 def @metadata end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/smartest/test_case.rb', line 5 def name @name end |