Module: Zen::Service::SpecHelpers

Defined in:
lib/zen/service/spec_helpers.rb

Defined Under Namespace

Modules: ClassMethods Classes: ServiceMocker

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(target) ⇒ Object



5
6
7
# File 'lib/zen/service/spec_helpers.rb', line 5

def self.included(target)
  target.extend(ClassMethods)
end

Instance Method Details

#stub_service(service) ⇒ Object

Example:

stub_service(MyService)
  .with_atributes(foo: 'foo')
  .with_stubs(result: 'bar', success: true)
  .service


14
15
16
# File 'lib/zen/service/spec_helpers.rb', line 14

def stub_service(service)
  ServiceMocker.new(self).stub_service(service)
end