Resolve the helper or view from the test name when using the spec DSL
# File lib/minitest/rails.rb, line 71 def self.determine_default_helper_class(name) determine_constant_from_test_name(name) do |constant| Module === constant && !(Class === constant) end end
Checks the numeric difference between the return value of an expression as a result of what is evaluated.
assert_difference "User.count", +1 do User.create end
# File lib/minitest/rails/assertions.rb, line 614
Checks that the numeric result of evaluating an expression is not changed before and after invoking.
assert_no_difference "User.count" do User.new end
# File lib/minitest/rails/assertions.rb, line 626