Module: ROM::Lint::TestGateway

Extended by:
Test
Defined in:
lib/rom/lint/test.rb

Overview

This is a simple lint-test for gateway class to ensure the basic interfaces are in place

Examples:


class MyGatewayTest < Minitest::Test
  include ROM::Lint::TestGateway

  def setup
    @gateway = MyGateway
    @uri = "super_db://something"
  end
end

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#gatewayObject (readonly)

Returns the gateway class



50
51
52
# File 'lib/rom/lint/test.rb', line 50

def gateway
  @gateway
end

#identifierObject (readonly)

Returns the gateway identifier e.g. +:memory+



45
46
47
# File 'lib/rom/lint/test.rb', line 45

def identifier
  @identifier
end

#uriObject (readonly)

Returns gateway's URI e.g. "super_db://something"



55
56
57
# File 'lib/rom/lint/test.rb', line 55

def uri
  @uri
end

Class Method Details

.define_test_method(name, &block) ⇒ Object Originally defined in module Test

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Defines a test method converting lint failures to assertions

Parameters:

  • name (String)