v2.1.0 -
Show latest stable
- Superclass: Object
TODO: move to core_ext
Included modules
- ActionController::Assertions
- ActionController::TestProcess
- ActionMailer::TestHelper
- ActiveSupport::Deprecation::Assertions
- ActiveSupport::Testing::SetupAndTeardown
Files
- actionmailer/lib/action_mailer/test_helper.rb
- actionpack/lib/action_controller/assertions.rb
- actionpack/lib/action_controller/test_process.rb
- activerecord/lib/active_record/fixtures.rb
- activesupport/lib/active_support/deprecation.rb
- activesupport/lib/active_support/test_case.rb
- railties/helpers/test_helper.rb
1Note
New test syntax
You can use either one and even mix in the same test case if you want: class Test < Test::Unit::TestCase # old way to define a test method (prefix with test_) def test_should_be_valid_without_content assert Comment.new.valid? end
# new way to define a test
test "should be valid without content" do
assert Comment.new.valid?
end
end