mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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:
parent
c8d0dc376a
commit
a6c60222c5
4 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
#
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue