Class: RspecSequel::Matchers::HaveOneToManyMatcher

Inherits:
Association show all
Defined in:
lib/rspec_sequel/matchers/have_one_to_many.rb

Instance Method Summary collapse

Methods inherited from Association

#description

Methods inherited from Base

#failure_message, #hash_to_nice_string, #initialize, #matches?, #negative_failure_message

Constructor Details

This class inherits a constructor from RspecSequel::Base

Instance Method Details

#association_typeObject



5
6
7
# File 'lib/rspec_sequel/matchers/have_one_to_many.rb', line 5

def association_type
  :one_to_many
end

#valid?(db, i, c, attribute, options) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
13
14
# File 'lib/rspec_sequel/matchers/have_one_to_many.rb', line 9

def valid?(db, i, c, attribute, options)
  matching = super

  # check that association model exists, etc.
  matching
end