Stormwind
e81dff9c07
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.)
16 lines
348 B
Ruby
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
|