Module: MiniTest::Matchers::ActiveModel::Helpers

Included in:
ValidationMatcher
Defined in:
lib/matchers/helpers.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#class_of(subject) ⇒ Object


9
10
11
# File 'lib/matchers/helpers.rb', line 9

def class_of subject
  subject.is_a?(Class) ? subject : subject.class
end

#to_sentence(ary) ⇒ Object


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

def to_sentence ary
  ary.collect(&:inspect).to_sentence
end