class ActionView::TestCase
Public Class Methods
determine_default_helper_class(name)
click to toggle source
Resolve the helper or view from the test name when using the spec DSL
# File lib/minitest/rails.rb, line 69 def self.determine_default_helper_class(name) determine_constant_from_test_name(name) do |constant| Module === constant && !(Class === constant) end end
Public Instance Methods
assert_difference(expression, difference = 1, message = nil, &block)
click to toggle source
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
See also Minitest::Rails::Expectations#must_change
# File lib/minitest/rails/assertions.rb, line 546
assert_no_difference(expression, message = nil, &block)
click to toggle source
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
See also Minitest::Rails::Expectations#wont_change
# File lib/minitest/rails/assertions.rb, line 558
Also aliased as: refute_difference
refute_difference()
Checks that the numeric result of evaluating an expression is not changed before and after invoking.
refute_difference "User.count", do User.new end
See also Minitest::Rails::Expectations#wont_change
:args: expression, message = nil, &block
Alias for: assert_no_difference