search for: httpmocks

Displaying 7 results from an estimated 7 matches for "httpmocks".

Did you mean: httpmock
2009 Jun 24
3
ActiveResource:: HttpMock
I''m trying to set up testing on my ActiveResource project. The HttpMock appears to be what I want, but whenever I use the code in the "documentation", I get the error NameError: uninitialized constant ActiveResource::HttpMock Is there something I need to do to enable HttpMock testing? Thanks, Tom
2010 May 15
3
ActiveResource Mock Objects
Some of my tests use ActiveResource HttpMock requests and some of them do not. Does anyone know if there is a way to disable the HttpMocks after they have already been loaded? The method ActiveResource::HttpMock.reset! only removes all the objects, but ActiveResource still thinks it should look for mock requests rather than actually making requests. I hope this makes sense! Thanks, Tom -- You received this message because you are...
2010 Jul 02
3
Ticket #5038 ActiveResource not handling updates correctly
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5038-activeresource-not-handling-updates-correctly I just added this ticket. I''m writing a Sinatra API to be consumed by Rails and I''ve run into an issue where the ActiveResource documentation specifies that on update you should return an HTTP 204 status with no body. The problem is that Rack doesn''t
2010 Aug 29
0
Troll - A Rails plugin for making webservice mocking easier
Hi Folks, Troll trumps your existing ActiveResource mocking libraries like inbuilt HttpMock,Fakeweb or Webmock out of water. With Troll, ActiveResource mocking just works, some of its features: 1. Don''t need to mock calls at Net::HTTP level (which webmock,fakeweb do). Really, we don''t care what HTTP library ActiveResource uses, fakeweb and webmock bring additional complexity
2008 Mar 01
0
Testing XML over HTTP in a Rails app
Hi I''m looking at testing the XML API methods of my RESTful controllers -- create, update etc. I thought this would be really straightforward, and perhaps it is, but I''m struggling to find a good explanation of how to go about it the Rails way. Firstly, I can successfully test it from the command line using curl, e.g: curl -H "Accept: application/xml" -X GET --basic
2008 Sep 04
0
ActiveResource testing
Hi, I''m trying to make some good testing on active resources, but I''ve some trouble with the *post* method. Basically this is my mock, where I set the POST verb and the expected URI. ActiveResource::HttpMock.respond_to do |mock| mock.post "/locations/buildings.xml?description=new- description&name=new-name", {}, @variable, 201 end Now, if I call the post
2009 Apr 10
0
ActiveRecord belongs_to ActiveResource
class Thing < ActiveRecord::Base belongs_to :other_thing end class OtherThing < ActiveResource::Base self.site = ... end The association here works. I can access other_thing from thing with no problems until, as usual, testing. Specifically functionally test the things_controller. The things controller is simple scaffold, however, having the association to an active resource model