Modified content in guides and comments

for "assert /" warnings.
Removed because if somebody will use this code
they will get warnings!
This commit is contained in:
Arun Agrawal 2011-09-04 08:24:02 +05:30
parent c8d0dc376a
commit a6c60222c5
4 changed files with 8 additions and 8 deletions

View File

@ -18,8 +18,8 @@ module ActiveSupport
# Developer.all
# wait
# assert_equal 1, @logger.logged(:debug).size
# assert_match /Developer Load/, @logger.logged(:debug).last
# assert_match /SELECT \* FROM "developers"/, @logger.logged(:debug).last
# assert_match(/Developer Load/, @logger.logged(:debug).last)
# assert_match(/SELECT \* FROM "developers"/, @logger.logged(:debug).last)
# end
# end
#

View File

@ -514,8 +514,8 @@ class UserMailerTest < ActionMailer::TestCase
# Test the body of the sent email contains what we expect it to
assert_equal [user.email], email.to
assert_equal "Welcome to My Awesome Site", email.subject
assert_match /<h1>Welcome to example.com, #{user.name}<\/h1>/, email.encoded
assert_match /Welcome to example.com, #{user.name}/, email.encoded
assert_match(/<h1>Welcome to example.com, #{user.name}<\/h1>/, email.encoded)
assert_match(/Welcome to example.com, #{user.name}/, email.encoded)
end
end
</ruby>

View File

@ -931,7 +931,7 @@ class UserControllerTest < ActionController::TestCase
assert_equal "You have been invited by me@example.com", invite_email.subject
assert_equal 'friend@example.com', invite_email.to[0]
assert_match /Hi friend@example.com/, invite_email.body
assert_match(/Hi friend@example.com/, invite_email.body)
end
end
</ruby>

View File

@ -81,7 +81,7 @@ module Rails
#
# assert_file "app/controller/products_controller.rb" do |controller|
# assert_instance_method :index, content do |index|
# assert_match /Product\.all/, index
# assert_match(/Product\.all/, index)
# end
# end
#
@ -148,7 +148,7 @@ module Rails
#
# assert_migration "db/migrate/create_products.rb" do |migration|
# assert_class_method :up, migration do |up|
# assert_match /create_table/, up
# assert_match(/create_table/, up)
# end
# end
#
@ -161,7 +161,7 @@ module Rails
#
# assert_file "app/controller/products_controller.rb" do |controller|
# assert_instance_method :index, content do |index|
# assert_match /Product\.all/, index
# assert_match(/Product\.all/, index)
# end
# end
#