From 693f977ad71345056099572c738a893b92727f8f Mon Sep 17 00:00:00 2001 From: Stuart Blair Date: Fri, 27 Jan 2012 11:30:24 -0800 Subject: [PATCH] Adding failing spec to show how we should deal with form data --- Gemfile | 3 ++- features/step_definitions/fake_dispatcher_steps.rb | 2 +- spec/fake_dispatcher_servlet_spec.rb | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 27e9bf6..c2a2710 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,5 @@ -source "http://rubygems.org" +source "http://gemcutter" +#source "http://rubygems.org" # Specify your gem's dependencies in reigns.gemspec gemspec diff --git a/features/step_definitions/fake_dispatcher_steps.rb b/features/step_definitions/fake_dispatcher_steps.rb index c2335f7..0308922 100644 --- a/features/step_definitions/fake_dispatcher_steps.rb +++ b/features/step_definitions/fake_dispatcher_steps.rb @@ -24,7 +24,7 @@ end When /^I POST a body to (\S+) containing form data:\-$/ do |uri, table| - @last_response = send_request(:POST, uri) do |content| + @last_response = send_request('POST', uri) do |content| content << URI.encode_www_form(uri) puts "Incidentally Stuart, here's what the body of the form looks like:'#{content}'" end diff --git a/spec/fake_dispatcher_servlet_spec.rb b/spec/fake_dispatcher_servlet_spec.rb index f8ae221..730863c 100644 --- a/spec/fake_dispatcher_servlet_spec.rb +++ b/spec/fake_dispatcher_servlet_spec.rb @@ -25,6 +25,10 @@ module Reigns @fake_dispatcher_servlet.service(:get, "/goodbye").get_status.should eql 404 end end + + context "when receiving form data" do + pending + end end describe "message routing" do