Class: Pact::VerificationTask

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/pact/tasks/verification_task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) {|_self| ... } ⇒ VerificationTask

Returns a new instance of VerificationTask.

Yields:

  • (_self)

Yield Parameters:



36
37
38
39
40
41
42
43
# File 'lib/pact/tasks/verification_task.rb', line 36

def initialize(name)
  @rspec_opts = nil
  @ignore_failures = false
  @pact_spec_configs = []
  @name = name
  yield self
  rake_task
end

Instance Attribute Details

#_pact_helperObject

Returns the value of attribute _pact_helper.



34
35
36
# File 'lib/pact/tasks/verification_task.rb', line 34

def _pact_helper
  @_pact_helper
end

#ignore_failuresObject

Returns the value of attribute ignore_failures.



33
34
35
# File 'lib/pact/tasks/verification_task.rb', line 33

def ignore_failures
  @ignore_failures
end

#pact_spec_configsObject (readonly)

Returns the value of attribute pact_spec_configs.



31
32
33
# File 'lib/pact/tasks/verification_task.rb', line 31

def pact_spec_configs
  @pact_spec_configs
end

#rspec_optsObject

Returns the value of attribute rspec_opts.



32
33
34
# File 'lib/pact/tasks/verification_task.rb', line 32

def rspec_opts
  @rspec_opts
end

Instance Method Details

#pact_helper(pact_helper) ⇒ Object



45
46
47
# File 'lib/pact/tasks/verification_task.rb', line 45

def pact_helper(pact_helper)
  @pact_spec_configs << { pact_helper: pact_helper }
end

#uri(uri, options = {}) ⇒ Object



49
50
51
# File 'lib/pact/tasks/verification_task.rb', line 49

def uri(uri, options = {})
  @pact_spec_configs << {uri: uri, pact_helper: options[:pact_helper]}
end