提交 a47a65f1 编写于 作者: J José Valim

Merge pull request #1243 from smartinez87/warnings

Fix 'warning: ambiguous first argument; put parentheses or even spaces'.
......@@ -33,7 +33,7 @@ def wait
wait
assert_equal 1, logger.logged(:debug).size
assert_match /SHOW tables/, logger.logged(:debug).last
assert_match(/SHOW tables/, logger.logged(:debug).last)
end
end
end
......@@ -21,19 +21,19 @@ def logs
test "logger logs proper HTTP verb and path" do
get "/blah"
wait
assert_match /^Started GET "\/blah"/, logs[0]
assert_match(/^Started GET "\/blah"/, logs[0])
end
test "logger logs HTTP verb override" do
post "/", {:_method => 'put'}
wait
assert_match /^Started PUT "\/"/, logs[0]
assert_match(/^Started PUT "\/"/, logs[0])
end
test "logger logs HEAD requests" do
post "/", {:_method => 'head'}
wait
assert_match /^Started HEAD "\/"/, logs[0]
assert_match(/^Started HEAD "\/"/, logs[0])
end
end
end
......
......@@ -31,7 +31,7 @@ def test_environment_is_required_in_rake_tasks
AppTemplate::Application.initialize!
RUBY
assert_match "SuperMiddleware", Dir.chdir(app_path){ `rake middleware` }
assert_match("SuperMiddleware", Dir.chdir(app_path){ `rake middleware` })
end
def test_initializers_are_executed_in_rake_tasks
......@@ -93,16 +93,16 @@ def test_model_and_migration_generator_with_change_syntax
end
output = Dir.chdir(app_path){ `rake db:migrate` }
assert_match /create_table\(:users\)/, output
assert_match /CreateUsers: migrated/, output
assert_match /add_column\(:users, :email, :string\)/, output
assert_match /AddEmailToUsers: migrated/, output
assert_match(/create_table\(:users\)/, output)
assert_match(/CreateUsers: migrated/, output)
assert_match(/add_column\(:users, :email, :string\)/, output)
assert_match(/AddEmailToUsers: migrated/, output)
output = Dir.chdir(app_path){ `rake db:rollback STEP=2` }
assert_match /drop_table\("users"\)/, output
assert_match /CreateUsers: reverted/, output
assert_match /remove_column\("users", :email\)/, output
assert_match /AddEmailToUsers: reverted/, output
assert_match(/drop_table\("users"\)/, output)
assert_match(/CreateUsers: reverted/, output)
assert_match(/remove_column\("users", :email\)/, output)
assert_match(/AddEmailToUsers: reverted/, output)
end
def test_loading_specific_fixtures
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册