aboutsummaryrefslogtreecommitdiff
path: root/spec/unit/request/head_spec.rb
blob: 5622fd6fe1c77ce19d5588bfda2e5a46f3aa6bd7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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