similar to: ActiveResource Mock Objects

Displaying 20 results from an estimated 1000 matches similar to: "ActiveResource Mock Objects"

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 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
2007 Sep 22
4
ActiveResource, find(1) works but no find(:all)
Hi, I''m on edge and Fuser.find(1) works but Fuser.find(:all) shows the error [1]. Fuser is declared here [2]. Do you know what''s happening? Thanks. [1] ActiveResource::ServerError: Failed with 500 Internal Server Error from /.../vendor/rails/activeresource/lib/active_resource/connection.rb:124:in `handle_response'' from
2006 Sep 01
2
Include ActiveResource
Hello, I want to give ActiveResource a spin. I have all the code checked out from SVN in vendor/rails (yes, including ActiveResource). I''m trying to make sure it gets loaded. I did this in environment.rb: config.load_paths += %W( #{RAILS_ROOT}/vendor/rails/activeresource/lib ) Unfortunately I still can''t use it. I have an ActiveResource derived model, Address: class
2006 Nov 18
1
ActiveResource sample code?
I''d like to play around a bit with ActiveResource for consuming a web service. Does anyone have sample code they would be willing to share? I''ve googled all around and have come up empty except for simple (non- working) examples given in the RailsConf keynote and some associated blog entries. Thanks! cr --~--~---------~--~----~------------~-------~--~----~ You received
2009 May 20
1
activeresource-2.3.2 HTTPHeaderSyntaxError
Hi, I''m upgrading my app from 2.2.2 to 2.3.2 and am having a problem with ActiveResource. class FooResource < ActiveResource::Base self.site = "whatever" self.element_name = "foo" end FooResource.create(:bar => ''baz'') raises: Net::HTTPHeaderSyntaxError: wrong Content-Length format from
2011 Oct 16
4
Ruby on rails with twitter integration
after i searched, i got so many links related with the twitter integration , Then i do that with one following link http://cbpowell.wordpress.com/2011/03/17/twitter-oauth-and-ruby-on-rails-integrated-cookbook-style-in-the-console-updated-for-twitter-1-0/ after some steps with the rails console, *Then i got some errors after i gave the steps to send the tweet from the application * * client
2007 Sep 28
4
RSpec + EdgeRails on Windows
I recently post on my blog about setting up a Rails environment with RSpec in Windows, and someone left a comment saying that it doesn''t work in EdgeRails. I so I played around with it a bit and was able to confirm that none RSpec appears broken on EdgeRails. I''ll post the various error messages I received below. I''m not expecting any sort of patch or something for this
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
2010 Jun 17
2
"LoadError: no such file to load -- openssl", following Rails Guides
[With apologies for cross-posting at http://railsforum.com/viewtopic.php?id=39587] Hi all, I''m following the edge ''getting started'' guide at http://guides.rails.info/getting_started.html, running ROR 3. I''m running Ruby 1.9.2 (as instructed by the guide), installed using RVM. I get an error when following "4.3 Setting the Application Home Page".
2011 May 17
8
Changing Rails Default Date Parse Option
Does anyone know how to change the default option for the Date.parse (which ActiveRecord is using on all date fields). I would like the "comp" option to default to true so I don''t have to account for 2- digit dates throughout my application. http://corelib.rubyonrails.org/classes/Date.html#M001228 Thanks! Tom -- You received this message because you are subscribed to the
2007 Feb 07
5
Mocking ActiveResource
I want to use ActiveResource in my app. Instead of hitting server though, I want it to load from a file when I call find. Any clue how I do that? Pat
2008 Jan 21
4
Caching CSS Issue
I have a problem I was hoping someone could shed some light on. I noticed that with every request to my server, the css file was being requested. I went ahead and made a static link to the css file so there is no query string at all, but still I see the requests coming in with each request. Do I need to do anything else (in the response header maybe?) to make sure that browsers will cache the
2009 Aug 06
18
Best Practices Question
Should models call action mailers, or should those calls always originate from controllers? For example, should user.forgot_password send the email, or should the user_controller.forgot_password? Just looking for some opinions... Thanks, Tom
2009 May 20
2
Rails 2.3.2 Multipart Emails
I''m trying to send implicit multipart emails with Rails 2.3.2. I have the files as in the past: mailer_action.text.plain.erb mailer_action.text.html.erb When I run my tests, everything looks good. When I deliver email from the console running in production mode, everything looks good. When my controller calls the method, it uses the html template to send a plain text email. Anyone
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
2007 Mar 10
6
ActiveResources 0.1.0 Released
See the blog post at http://blog.lonestarsoftware.net/2007/03/09/active_resources-010-released/ Reading through the rails blogosphere last week, I read a post (which I can not find again) that suggested a completely different approach to AJAX use in rails apps. The idea was to create a Javascript proxy to the ActiveRecord models and allow AR operations to be called from the client. I see this
2007 May 16
2
RMagick Setting Quality or Compression
I am trying to dynamically set the compression or quality of an image when displaying it. I have seen in the RMagick documentation how to set the quality only when writing the file to disk. How can I set the quality dynamically or set the compression? The method "image.quality=" does not exist and "image.compression_type=" is not in the documentation. I have tried