summaryrefslogtreecommitdiff
path: root/spec/unit/request/get_spec.rb
blob: 0b96abcc7933ba61deb83c390699125bc4061882 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'spec_helper'

describe Zero::Request, '#get?' do
  subject { Zero::Request.new(env) }

  context "with a get request" do
    let(:env) { EnvGenerator.get('/foo') }
    its(:get?) { should be(true) }
  end

  context "with a post request" do
    let(:env) { EnvGenerator.post('/foo') }
    its(:get?) { should be(false) }
  end
end