diff options
author | Gibheer <gibheer@gmail.com> | 2012-11-13 07:47:05 +0100 |
---|---|---|
committer | Gibheer <gibheer@gmail.com> | 2012-11-13 07:47:05 +0100 |
commit | 646d3a9e23b8d8d7912186bec624beb493d4e81b (patch) | |
tree | ae3e73dfb34c0c33f49128eba40f46e9699a0619 /spec/unit/request/post_spec.rb | |
parent | e56d74c140da761182d65ae181448c0a6ca2ad6b (diff) |
more specs for the #? methods of request
Diffstat (limited to 'spec/unit/request/post_spec.rb')
-rw-r--r-- | spec/unit/request/post_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/unit/request/post_spec.rb b/spec/unit/request/post_spec.rb new file mode 100644 index 0000000..2bfa834 --- /dev/null +++ b/spec/unit/request/post_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe Zero::Request, '#post?' 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 |