similar to: Troll - A Rails plugin for making webservice mocking easier

Displaying 20 results from an estimated 300 matches similar to: "Troll - A Rails plugin for making webservice mocking easier"

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 --
2012 Jan 15
1
How to mock out a WEBrick::HTTPServer?
partial code : http://pastie.org/3186140 I want to test a HTTP server, I''m using lower level stuff so I can understand whats going on, then I might move onto FakeWeb/WebMock/etc Its a reverse proxy, so it doesn''t generate the page content. I want to test a/ methods in the class in isolation b/ test that if a HTTP request sent in generates a HTTP request out (suppose should be
2006 May 23
0
FakeWeb test helper for Net::HTTP / open-uri web requests
Hey All, I''ve posted the first release of FakeWeb, a little library to help with all your http client testing needs. This helper makes it trivial to setup an idempodent environment for you to test any web service requests in your applications. Available on RubyForge, http://rubyforge.org/projects/fakeweb/ == Overview * Force Net::HTTP (and any dependent libraries, e.g. open-uri) to
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
2011 Feb 16
3
stubbing gets undone?
I''m looking at an example where a stub seems to work sometimes, and sometimes appears to become "unstubbed". I haven''t boiled it down to a minimal example, but it goes something like this: ---- the model: class Premise << ActiveRecord::Base def lookup_stuff_on_the_web $stderr.puts("entering lookup_stuff_on_the_web with #{self}") ... end end
2012 Jul 05
0
tests , assertion output value always <>
no problem running my tests ( units , functionals ) but when assertion failed , I never see any assertion output value, it''s always <> and expected also is <> i.e. : => 33: assert ability.can? :index, User 34: get :index 35: assert_response :success 36: assert_not_nil assigns(:users) <> expected but was <> I must have some
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
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
2005 Mar 22
0
[Fwd: Re: troll or truth ?]
This was intended to go to the mailing list :) -------------- next part -------------- An embedded message was scrubbed... From: Maik Merten <maikmerten@gmx.net> Subject: Re: [Theora] troll or truth ? Date: Wed, 23 Mar 2005 01:40:00 +0100 Size: 1111 Url: http://lists.xiph.org/pipermail/theora/attachments/20050323/5fe9d818/Theoratrollortruth-0001.mht
2008 Oct 29
3
OT - Please don't feed the Troll(s)
Folks, I fully understand the emotional need to respond to one who throws around terms like "Communist", "Tyrannical", etc. even if ostensibly framed as a rhetorical question. Certain terms and phrases are by nature pejorative and I;m sure the OP knew this when he entered his post. My feeling was the OP is either an ignorant, unappreciative, self-centered, and emotionally
2003 Feb 25
1
Um, did Lundy troll the vorbis archives..? Did anyone else *not* sign up with him?
Received: from riptrax.com (adsl-65-65-126-45.dsl.rcsntx.swbell.net [65.65.126.45]) [...] From: "John Lundy" <jlundy@riptrax.com> To: "RipTrax List Member" <RipTrax@riptrax.com> Subject: [RipTrax] Announcing a new web site, a new mail list and a new RipTrax version I've seen posts from him going on about RipTrax in the Vorbis users mailing list. Is he
2000 Feb 03
1
Not a troll
Dave CB: I reconfigured the mail client on the shared dial up computer at the school to read the latest samba articles. I apparently made a typo. The email address is hhacker@calweb.com. The school, Kit Carson Middle School is NOT a university. If it were a university, it would have Internet access besides a lame dial up. Its a 6/7/8 grade school in a slightly worse off section of town.
2005 Mar 22
3
troll or truth ?
Hello, I was discussing on the mplayer/mencoder ML about transcodingfrom Divx to Theora. I got these kind of answers: http://article.gmane.org/gmane.comp.video.mencoder.user/280 Of course I understoud only 50% of what he said, as well as I am not really used with codec and video glossary... But I generally understoud his opinion. What to think? I would like not to believe him, espacially when
2009 May 04
6
cucumber - when to stub/mock
I''m just curious about this, since my solution involved stubbing a call to GeoIp. Is there a good rule of thumb for when you make exceptions to the ''no stubbing'' philosophy of Cucumber? My step was: "Given I am accessing the site from Japan," but I can think of other situations - mostly when interacting with web services, that I''d probably
2006 May 14
0
Invoke .Net WebService error in RoR
I have written a webservice: ----------- Service.cs ---------------- using System; using System.Web; using System.Web.Services; using System.Web.Services.Protocols; [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class Service : System.Web.Services.WebService { [WebMethod] public string HelloWorld(string name)
2006 May 24
0
webservice integration test?
Hey railers, I''m a newbie, so excuse me if the answer is obvious. We''re using a layered dispatch model for our back-end and I''d like to run some integration tests for things login and session authentication. The integration examples I''ve seen, however, make get/post calls to controllers and not web services. How would I do a sess.post w/ SOAP headers? Do I
2006 May 25
0
post to a webservice in an integration test?
Hey railers, Just wondering if anyone out there knows how to generate a SOAP post using the session object in an integration test. I couldn''t find documentation on how to do so, but perhaps I''m overlooking something. I would like to call a webservice on my server in the following block: def login open_session do |sess| ... sess.post
2006 Mar 13
0
REST webservice client
Hi *, I want to use the new MusicBrainz REST web service (http:// wiki.musicbrainz.org/XMLWebService) in my Rails application, and was looking for suggestions as I''ve never used ActionWebService and have little experience with web services in general. Can someone enlighten me ? Does Rails provide facilitations for this kind of task, or maybe Ruby module ... TIA, -- Nicholas