Module: Minitest::Assertions

Defined in:
lib/foghorn/minitest/assertions.rb

Instance Method Summary collapse

Instance Method Details

#i_do_declare(act, operator, exp) ⇒ Object



2
3
4
5
6
7
8
9
10
# File 'lib/foghorn/minitest/assertions.rb', line 2

def i_do_declare(act, operator, exp)
  if operator.to_sym == :to_be
    assert_equal(exp, act) if operator == :to_be
  elsif operator.to_sym == :to_not_be
    refute_equal(exp, act) if operator == :to_not_be
  else
    fail 'Operator not in :to_be or :to_not_be'
  end
end