Class: Producer::Core::Test

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/producer/core/test.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#argumentsObject (readonly)

Returns the value of attribute arguments.



8
9
10
# File 'lib/producer/core/test.rb', line 8

def arguments
  @arguments
end

#envObject (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

Returns:

  • (Boolean)


16
17
18
# File 'lib/producer/core/test.rb', line 16

def negated?
  @negated
end

#pass?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/producer/core/test.rb', line 20

def pass?
  verify ^ negated?
end

#verifyObject



24
25
26
# File 'lib/producer/core/test.rb', line 24

def verify
  fail NotImplementedError
end