提交 a6c60222 编写于 作者: A Arun Agrawal

Modified content in guides and comments

for "assert /" warnings.
Removed because if somebody will use this code
they will get warnings!
上级 c8d0dc37
......@@ -18,8 +18,8 @@ class LogSubscriber
# 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 @@ def self.destination(path)
#
# 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 @@ def assert_no_migration(relative)
#
# 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 @@ def assert_class_method(method, content, &block)
#
# 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
#
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册