summaryrefslogtreecommitdiff
path: root/test/spec_runtime.rb
diff options
context:
space:
mode:
authoryhirano55 <yhirano@me.com>2018-04-17 17:50:18 +0900
committerJeremy Daer <jeremydaer@gmail.com>2018-04-17 01:50:18 -0700
commitb72bfc9435c118c54019efae1fedd119521b76df (patch)
tree1ddc6654e0390e02c8d995cbcbcc27770df3e225 /test/spec_runtime.rb
parent17d56111627874a45b479e52f13627332e1c83e1 (diff)
downloadrack-b72bfc9435c118c54019efae1fedd119521b76df.tar.gz
RuboCop: enable Layout/Space* cops (#1259)
Diffstat (limited to 'test/spec_runtime.rb')
-rw-r--r--test/spec_runtime.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/spec_runtime.rb b/test/spec_runtime.rb
index a47c0e2b..5a7e84bd 100644
--- a/test/spec_runtime.rb
+++ b/test/spec_runtime.rb
@@ -15,25 +15,25 @@ describe Rack::Runtime do
end
it "sets X-Runtime is none is set" do
- app = lambda { |env| [200, {'Content-Type' => 'text/plain'}, "Hello, World!"] }
+ app = lambda { |env| [200, { 'Content-Type' => 'text/plain' }, "Hello, World!"] }
response = runtime_app(app).call(request)
response[1]['X-Runtime'].must_match(/[\d\.]+/)
end
it "doesn't set the X-Runtime if it is already set" do
- app = lambda { |env| [200, {'Content-Type' => 'text/plain', "X-Runtime" => "foobar"}, "Hello, World!"] }
+ app = lambda { |env| [200, { 'Content-Type' => 'text/plain', "X-Runtime" => "foobar" }, "Hello, World!"] }
response = runtime_app(app).call(request)
response[1]['X-Runtime'].must_equal "foobar"
end
it "allow a suffix to be set" do
- app = lambda { |env| [200, {'Content-Type' => 'text/plain'}, "Hello, World!"] }
+ app = lambda { |env| [200, { 'Content-Type' => 'text/plain' }, "Hello, World!"] }
response = runtime_app(app, "Test").call(request)
response[1]['X-Runtime-Test'].must_match(/[\d\.]+/)
end
it "allow multiple timers to be set" do
- app = lambda { |env| sleep 0.1; [200, {'Content-Type' => 'text/plain'}, "Hello, World!"] }
+ app = lambda { |env| sleep 0.1; [200, { 'Content-Type' => 'text/plain' }, "Hello, World!"] }
runtime = runtime_app(app, "App")
# wrap many times to guarantee a measurable difference