class ActionDispatch::IntegrationTest

Public Instance Methods

assert_blank(actual, message = nil) click to toggle source

Checks if an expression is blank. Passes if actual.blank? is true.

This assertion is deprecated.

Use the following to check for blank? instead:

assert actual.blank?

The deprecated assertion can be called like this:

assert_blank []

See also MiniTest::Rails::Expectations#must_be_blank

# File lib/minitest/rails/assertions.rb, line 1228
  
Also aliased as: refute_present
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 1294
  
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 1306
  
Also aliased as: refute_difference
assert_present(actual, message = nil) click to toggle source

Checks if an expression is present. Passes if actual.present? is true.

This assertion is deprecated.

Use the following to check for present? instead:

assert actual.present?

The deprecated assertion can be called like this:

assert_present Object.new

See also MiniTest::Rails::Expectations#must_be_present

# File lib/minitest/rails/assertions.rb, line 1264
  
Also aliased as: refute_blank
refute_blank()

Checks if an expression is not blank. Passes if actual.blank? is false.

This assertion is deprecated.

Use the following to check for blank? instead:

refute actual.blank?

The deprecated assertion can be called like this:

refute_blank [1,2,3]

See also MiniTest::Rails::Expectations#wont_be_blank

:args: actual, message = nil

Alias for: assert_present
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

refute_present()

Checks if an expression is not present. Passes if actual.present? is false.

This assertion is deprecated.

Use the following to check for present? instead:

refute actual.present?

The deprecated assertion can be called like this:

refute_present nil

See also MiniTest::Rails::Expectations#wont_be_present

:args: actual, message = nil

Alias for: assert_blank