0
0
zero/spec/unit/request/head_spec.rb
2012-11-13 07:47:05 +01:00

16 lines
343 B
Ruby

require 'spec_helper'
describe Zero::Request, '#head?' do
subject { Zero::Request.new(env) }
context "with a head request" do
let(:env) { EnvGenerator.head('/foo') }
its(:head?) { should be(true) }
end
context "with a get request" do
let(:env) { EnvGenerator.get('/foo') }
its(:head?) { should be(false) }
end
end