Module: ROM::Lint::TestEnumerableDataset

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

Overview

This is a simple lint-test for a gateway dataset class to ensure the basic behavior is correct

Examples:


class MyDatasetLintTest < Minitest::Test
  include ROM::Lint::TestEnumerableDataset

   def setup
     @data  = [{ name: 'Jane', age: 24 }, { name: 'Joe', age: 25 }]
     @dataset = MyDataset.new(@data, [:name, :age])
   end
 end

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#dataObject (readonly)

Returns the expected data



91
92
93
# File 'core/lib/rom/lint/test.rb', line 91

def data
  @data
end

#datasetObject (readonly)

Returns the dataset instance



86
87
88
# File 'core/lib/rom/lint/test.rb', line 86

def dataset
  @dataset
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)