Class: SharkSpec

Inherits:
Object
  • Object
show all
Extended by:
Shark::RSpec::Helpers
Defined in:
lib/bima-shark-sdk/rspec.rb

Class Method Summary collapse

Methods included from Shark::RSpec::Helpers::FormServiceHelper

#form_inputs, #form_version

Methods included from Shark::RSpec::Helpers::Response

#fake_response

Methods included from Shark::RSpec::Helpers::Fixtures

#form_inputs_json, #form_structure_json, #load_fixture, #load_json_fixture

Class Method Details

.method_missing(name, *args, &block) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/bima-shark-sdk/rspec.rb', line 11

def method_missing(name, *args, &block)
  if name.match(/^stub_/)
    fake_service(name).setup
  elsif name.match(/^unstub_/)
    fake_service(name).reset
  else
    super
  end
end

.respond_to_missing?(name, _include_private) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
24
25
26
27
28
29
# File 'lib/bima-shark-sdk/rspec.rb', line 21

def respond_to_missing?(name, _include_private)
  if name.match(/^stub_/)
    true
  elsif name.match(/^unstub_/)
    true
  else
    super
  end
end