Class: Alice::Adapter::Test::Stub

Inherits:
Struct
  • Object
show all
Defined in:
lib/alice/adapter/test.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#blockObject

Returns the value of attribute block

Returns:

  • (Object)

    the current value of block


61
62
63
# File 'lib/alice/adapter/test.rb', line 61

def block
  @block
end

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body


61
62
63
# File 'lib/alice/adapter/test.rb', line 61

def body
  @body
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path


61
62
63
# File 'lib/alice/adapter/test.rb', line 61

def path
  @path
end

Instance Method Details

#matches?(request_path, request_body) ⇒ Boolean

Returns:

  • (Boolean)

62
63
64
# File 'lib/alice/adapter/test.rb', line 62

def matches?(request_path, request_body)
  request_path == path && request_body == body
end