class Representable::Matchers::RepresentableCollectionMatcher
Public Instance Methods
description()
click to toggle source
# File lib/matchers/representable_collection_matcher.rb, line 11 def description "only allow representable collection" end
failure_message_for_should()
click to toggle source
# File lib/matchers/representable_collection_matcher.rb, line 15 def failure_message_for_should "Expected #{expectation}" end
failure_message_for_should_not()
click to toggle source
# File lib/matchers/representable_collection_matcher.rb, line 19 def failure_message_for_should_not "Did not expect #{expectation}" end
matches?(subject)
click to toggle source
# File lib/matchers/representable_collection_matcher.rb, line 6 def matches?(subject) @subject = subject collection? end
Private Instance Methods
collection?()
click to toggle source
# File lib/matchers/representable_collection_matcher.rb, line 25 def collection? @subject.send(:representable_attrs)[property].options[:collection] == true end
expectation()
click to toggle source
# File lib/matchers/representable_collection_matcher.rb, line 29 def expectation "#{@subject.class} to be a collection" end