public
Rubygem
Description: Makes http fun! Also, makes consuming restful web services dead easy.
Homepage:
Clone URL: git://github.com/jnunemaker/httparty.git
Click here to lend your support to: httparty and make a donation at www.pledgie.com !
Fixed failing specs.
jnunemaker (author)
Fri Oct 24 21:34:25 -0700 2008
commit  f90c40914a3dec04face3a160eb5bdb6b2226ad6
tree    a28f7edc11c1c53d9933431a59dbc1d7d1c4e0e4
parent  31ad4f91c8c234b15b0d415eb2c088f6838846dc
...
66
67
68
69
 
70
71
72
73
74
 
75
76
77
...
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
...
66
67
68
 
69
70
71
72
73
 
74
75
76
77
...
91
92
93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
95
96
0
@@ -66,12 +66,12 @@ describe HTTParty do
0
   describe "format" do
0
     it "should allow xml" do
0
       Foo.format :xml
0
-      Foo.instance_variable_get("@format").should == 'xml'
0
+      Foo.instance_variable_get("@format").should == :xml
0
     end
0
     
0
     it "should allow json" do
0
       Foo.format :json
0
-      Foo.instance_variable_get("@format").should == 'json'
0
+      Foo.instance_variable_get("@format").should == :json
0
     end
0
     
0
     it 'should not allow funky format' do
0
@@ -91,24 +91,6 @@ describe HTTParty do
0
     end
0
   end
0
   
0
-  describe "deriving format from path" do
0
-    it "should work if there is extension and extension is an allowed format" do
0
-      %w[xml json].each do |ext|
0
-        Foo.send(:format_from_path, "/foo/bar.#{ext}").should == ext
0
-      end
0
-    end
0
-    
0
-    it "should NOT work if there is extension but extention is not allow format" do
0
-      Foo.send(:format_from_path, '/foo/bar.php').should == nil
0
-    end
0
-    
0
-    it 'should NOT work if there is no extension' do
0
-      ['', '.'].each do |ext|
0
-        Foo.send(:format_from_path, "/foo/bar#{ext}").should == nil
0
-      end
0
-    end
0
-  end
0
-  
0
   describe 'parsing responses' do
0
     it 'should handle xml automatically' do
0
       xml = %q[<books><book><id>1234</id><name>Foo Bar!</name></book></books>]

Comments