0
0
zero/spec/unit/request/patch_spec.rb
Stormwind e81dff9c07 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.)
2013-01-06 12:37:07 +01:00

16 lines
348 B
Ruby

require 'spec_helper'
describe Zero::Request, '#patch?' do
subject { Zero::Request.new(env) }
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(:patch?) { should be(false) }
end
end