aboutsummaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorStormwind <stormwind@stormwinds-page.de>2013-01-06 12:37:07 +0100
committerStormwind <stormwind@stormwinds-page.de>2013-01-06 12:37:07 +0100
commite81dff9c07770650b8bf81e30474a0b957316de8 (patch)
tree5eae119928d4738806ceb33f151459ac8de59405 /spec/unit
parentcd97198e2269e8651d5f8081ec20501c8ea39aa9 (diff)
Kill all mutants i Zero::Request
Fix tests for PATCH, because spec_helper didn't support it and the tests where wrong. Remove if statement from "conent_type", because ruby already returns nil, if the requested key in a hash is not found. (Sounds a bit ugly, but it's true.)
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/request/patch_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/request/patch_spec.rb b/spec/unit/request/patch_spec.rb
index 1c2d3c9..ae0d2db 100644
--- a/spec/unit/request/patch_spec.rb
+++ b/spec/unit/request/patch_spec.rb
@@ -3,13 +3,13 @@ require 'spec_helper'
describe Zero::Request, '#patch?' do
subject { Zero::Request.new(env) }
- context "with a post request" do
- let(:env) { EnvGenerator.post('/foo') }
- its(:post?) { should be(true) }
+ context "with a patch request" do
+ let(:env) { EnvGenerator.patch('/foo') }
+ its(:patch?) { should be(true) }
end
context "with a get request" do
let(:env) { EnvGenerator.get('/foo') }
- its(:post?) { should be(false) }
+ its(:patch?) { should be(false) }
end
end