From f90c40914a3dec04face3a160eb5bdb6b2226ad6 Mon Sep 17 00:00:00 2001 From: John Nunemaker Date: Sat, 25 Oct 2008 00:34:25 -0400 Subject: [PATCH] Fixed failing specs. --- spec/httparty_spec.rb | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/spec/httparty_spec.rb b/spec/httparty_spec.rb index 85b6143..aee471b 100644 --- a/spec/httparty_spec.rb +++ b/spec/httparty_spec.rb @@ -66,12 +66,12 @@ describe HTTParty do describe "format" do it "should allow xml" do Foo.format :xml - Foo.instance_variable_get("@format").should == 'xml' + Foo.instance_variable_get("@format").should == :xml end it "should allow json" do Foo.format :json - Foo.instance_variable_get("@format").should == 'json' + Foo.instance_variable_get("@format").should == :json end it 'should not allow funky format' do @@ -91,24 +91,6 @@ describe HTTParty do end end - describe "deriving format from path" do - it "should work if there is extension and extension is an allowed format" do - %w[xml json].each do |ext| - Foo.send(:format_from_path, "/foo/bar.#{ext}").should == ext - end - end - - it "should NOT work if there is extension but extention is not allow format" do - Foo.send(:format_from_path, '/foo/bar.php').should == nil - end - - it 'should NOT work if there is no extension' do - ['', '.'].each do |ext| - Foo.send(:format_from_path, "/foo/bar#{ext}").should == nil - end - end - end - describe 'parsing responses' do it 'should handle xml automatically' do xml = %q[1234Foo Bar!]