spec/twitter/client/status_spec.rb in twitter4r-0.5.0 vs spec/twitter/client/status_spec.rb in twitter4r-0.5.1

- old
+ new

@@ -24,21 +24,21 @@ @twitter.should_not_receive(:http_connect) @twitter.status(:get, nil) end it "should create expected HTTP GET request for :get case" do - @twitter.should_receive(:rest_oauth_connect).with(:get, "#{@uris[:get]}?#{@options.to_http_str}").and_return(@response) + @twitter.should_receive(:rest_oauth_connect).with(:get, @uris[:get], @options).and_return(@response) @twitter.status(:get, @options[:id]) end it "should invoke @twitter#rest_oauth_connect with given parameters equivalent to {:id => value.to_i} for :get case" do # Float case - @twitter.should_receive(:rest_oauth_connect).with(:get, "#{@uris[:get]}?#{{:id => @float.to_i}.to_http_str}").and_return(@response) + @twitter.should_receive(:rest_oauth_connect).with(:get, @uris[:get], {:id => @float.to_i}).and_return(@response) @twitter.status(:get, @float) # Twitter::Status object case - @twitter.should_receive(:rest_oauth_connect).with(:get, "#{@uris[:get]}?#{{:id => @status.to_i}.to_http_str}").and_return(@response) + @twitter.should_receive(:rest_oauth_connect).with(:get, @uris[:get], {:id => @status.to_i}).and_return(@response) @twitter.status(:get, @status) end it "should create expected HTTP POST request for :post case" do @twitter.should_receive(:rest_oauth_connect).with(:post, @uris[:post], :status => @message, :source => @source).and_return(@response) @@ -69,20 +69,20 @@ status = @twitter.status(:delete, nil) status.should be_nil end it "should create expected HTTP DELETE request for :delete case" do - @twitter.should_receive(:rest_oauth_connect).with(:delete, "#{@uris[:delete]}?#{@options.to_http_str}").and_return(@response) + @twitter.should_receive(:rest_oauth_connect).with(:delete, @uris[:delete], @options).and_return(@response) @twitter.status(:delete, @options[:id]) end it "should invoke @twitter#rest_oauth_connect with given parameters equivalent to {:id => value.to_i} for :delete case" do # Float case - @twitter.should_receive(:rest_oauth_connect).with(:delete, "#{@uris[:delete]}?#{{:id => @float.to_i}.to_http_str}").and_return(@response) + @twitter.should_receive(:rest_oauth_connect).with(:delete, @uris[:delete], {:id => @float.to_i}).and_return(@response) @twitter.status(:delete, @float) # Twitter::Status object case - @twitter.should_receive(:rest_oauth_connect).with(:delete, "#{@uris[:delete]}?#{{:id => @status.to_i}.to_http_str}").and_return(@response) + @twitter.should_receive(:rest_oauth_connect).with(:delete, @uris[:delete], {:id => @status.to_i}).and_return(@response) @twitter.status(:delete, @status) end it "should raise an ArgumentError when given an invalid status action" do lambda {