aboutsummaryrefslogtreecommitdiff
path: root/spec/unit/request/patch_spec.rb
diff options
context:
space:
mode:
authorGibheer <gibheer@gmail.com>2012-11-13 07:47:05 +0100
committerGibheer <gibheer@gmail.com>2012-11-13 07:47:05 +0100
commit646d3a9e23b8d8d7912186bec624beb493d4e81b (patch)
treeae3e73dfb34c0c33f49128eba40f46e9699a0619 /spec/unit/request/patch_spec.rb
parente56d74c140da761182d65ae181448c0a6ca2ad6b (diff)
more specs for the #? methods of request
Diffstat (limited to 'spec/unit/request/patch_spec.rb')
-rw-r--r--spec/unit/request/patch_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/unit/request/patch_spec.rb b/spec/unit/request/patch_spec.rb
new file mode 100644
index 0000000..1c2d3c9
--- /dev/null
+++ b/spec/unit/request/patch_spec.rb
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe Zero::Request, '#patch?' do
+ subject { Zero::Request.new(env) }
+
+ context "with a post request" do
+ let(:env) { EnvGenerator.post('/foo') }
+ its(:post?) { should be(true) }
+ end
+
+ context "with a get request" do
+ let(:env) { EnvGenerator.get('/foo') }
+ its(:post?) { should be(false) }
+ end
+end