Class: Producer::Core::Test
- Inherits:
-
Object
- Object
- Producer::Core::Test
- Extended by:
- Forwardable
- Defined in:
- lib/producer/core/test.rb
Direct Known Subclasses
Producer::Core::Tests::ConditionTest, Producer::Core::Tests::FileContains, Producer::Core::Tests::FileEq, Producer::Core::Tests::FileMatch, Producer::Core::Tests::HasDir, Producer::Core::Tests::HasEnv, Producer::Core::Tests::HasExecutable, Producer::Core::Tests::HasFile, Producer::Core::Tests::ShellCommandStatus, Producer::Core::Tests::YAMLEq
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#env ⇒ Object
readonly
Returns the value of attribute env.
Instance Method Summary collapse
-
#initialize(env, *arguments, negated: false) ⇒ Test
constructor
A new instance of Test.
- #negated? ⇒ Boolean
- #pass? ⇒ Boolean
- #verify ⇒ Object
Constructor Details
#initialize(env, *arguments, negated: false) ⇒ Test
Returns a new instance of Test.
10 11 12 13 14 |
# File 'lib/producer/core/test.rb', line 10 def initialize env, *arguments, negated: false @env = env @arguments = arguments @negated = negated end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
8 9 10 |
# File 'lib/producer/core/test.rb', line 8 def arguments @arguments end |
#env ⇒ Object (readonly)
Returns the value of attribute env.
8 9 10 |
# File 'lib/producer/core/test.rb', line 8 def env @env end |
Instance Method Details
#negated? ⇒ Boolean
16 17 18 |
# File 'lib/producer/core/test.rb', line 16 def negated? @negated end |
#pass? ⇒ Boolean
20 21 22 |
# File 'lib/producer/core/test.rb', line 20 def pass? verify ^ negated? end |
#verify ⇒ Object
24 25 26 |
# File 'lib/producer/core/test.rb', line 24 def verify fail NotImplementedError end |