similar to: Integration testing an api

Displaying 20 results from an estimated 90000 matches similar to: "Integration testing an api"

2006 Jan 05
3
has_one :dependent => true question
Hello, I have two classes that are self explanatory and are listed below. class User < ActiveRecord::Base belongs_to :account end class Account < ActiveRecord::Base has_one :account_owner, { :dependent => true, :class_name => "User", :conditions => "is_account_owner = 1" } has_many :users end In the signup controller when an account is created one user
2006 Mar 16
5
TimeZone, TZInfo, daylight savings, and composed_of
Does anyone know the best way to track time zone information. There doesn''t seem to be much documentation on this. So far it seems like a simple db field like create table accounts ( id int unsigned not null auto_increment, name varchar(50) not null, time_zone varchar(50) not null, ... primary key (id) ) and a class like class Account < AR ...
2006 Aug 07
16
Monthly billing and payment processor recommendations?
Hi, I''m setting up a site that will bill on a monthly basis. I would rather not have to worry about storing customer credit card information. Does anyone have recommendations on payment processors that offer monthly billing services? I don''t want to go the paypal route as I want the user to stay on the site. I''m hoping to find an API to integrate with. I have
2006 Apr 27
0
Intergration testing with ordered fixtures
Hi all. I have a question on accessing fixtures by name. I''m doing integration testing very similar to what is described in Jamis''s excellent writeup at http://jamis.jamisbuck.org/articles/2006/03/09/integration-testing-in-rails-1-1. The problem is that I am using ordered yml fixtures so that rake loads each element in the correct sequence. I need to do this because my
2008 Jan 31
1
RSpec and the Basecamp API
I realise that this is kind of a basic question but I''m new to rspec and still trying to work out how to do things. I''m working on a rails project that requires basecamp integration via the api, which is fairly trivial to use via the basecamp.rb wrapper: Connection: basecamp = Basecamp.new(APP_CONFIG[''api_host''], APP_CONFIG[''api_username''],
2007 Jan 23
2
SslRequirements plugin and mocha
Hi. I''m loving mocha but have ran into a problem with using the mocha plugin with a project that has the SslRequirement plugin. It seems there is some conflict between the two? Any ideas? $ ruby test/functional/calendar_controller_test.rb /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:478:in `const_missing'': uninitialized constant
2007 Dec 16
0
Integration Testing - hang with post parameters
I''m getting some weirdness with integration testing. The following works fine if I don''t have parameters, but as soon as I add parameters I get a hang. Not sure exactly where it is hanging. NO HANG post ''user/register'' HANG post ''user/register'', :user => {:name => ''John Doe'', :email =>
2006 Mar 08
6
best practices for handling uploaded images and capistrano
Quick question: I am going to use the file_column plugin to manage uploading thumbnails. By default the images are stored in the public/ dir of the rails project. The problem I see is that when capistrano redeploys a new build and symlinks it in none of the images will be in the new public/ dir... Does anyone have a solution for this? Thanks, Zack -------------- next part -------------- An
2006 May 02
4
How to extend rails rake tasks?
Does anyone know how to extend the buit-in rake tasks like test:unit. I want to custom load some fixtures in a particular order. Thanks, Zack
2010 Aug 03
0
curl works when testing JSON response but the functional and integration tests do not work.
I am trying to test an action which is supposed to give a json response The url goes something line /blah/model.json When I POST to that URL using curl like this curl -H "Content-Type:application/json" -H "Accept:appn/json" -d "data" http://localhost:3000/blah/model.json it works just fine. In my test functional test I have this method def post_json (data)
2004 Oct 25
1
Rails 0.8: Just shy of 100 additions, changes, tweaks, and fixes!
It''s been fifty days since our last confession, so it''s no wonder that this outpouring is by far the biggest yet in Rails history. It''s absolutely packed with goodies ranging from a whole new framework for sending email to the smallest new alias for an existing method. In total we''re just shy of 100 additions, changes, tweaks, and fixes. This is also
2006 Jan 20
6
Pre-populate db with yaml outside of testing?
Hi. What is the best way to pre-populate your database with records while developing, not testing? For example, I want to: 1) > [run this command to populate db] 2) > ruby script/server 3) now I can surf to localhost:3000 and my app will already have relevant data I''m hoping to use yaml to suck it in. Is there a way to use the Fixture class to handle this even though this is
2006 Aug 09
0
Schema Design: ActiveRecord and Group-Oriented Data
I will soon begin developing a group-oriented web application in Rails (think along the lines of BaseCamp, or Yahoo! Groups). So there will be plenty of data that will logically separate along group lines; as a concrete simple example, let''s suppose one feature is a message board to be modelled by Messages. When a user logs in to the app, she will be able to choose a group she
2006 Feb 14
2
Inline list editing with RJS: best practices
I wanted to get the community opinion on the best way to use partials and inline list (<li>) editing. I have a very common scenario where a list is rendered: --- index.rhtml --- <ul> <%= render :partial => ''item'', @collection => @items %> </ul> --- _item.rhtml (simplified) --- <li id="item_<%= item.id %>"> <div
2006 Aug 24
9
[slightly offtopic] A small, fast Apache2.2 (if there is such a thing)
Hi. I''m using Apache2.2 built from source + mod-proxy + ssl + svn. Everything works fine but I''m sure you I could disable a ton of modules during the build process and in httpd.conf to speed things up and run a tighter memory footprint. Has anyone bothered building Apache2.2 from source disabling all the unneeded modules. I am planning on going through the Apache docs but I
2006 Jul 11
1
Dynamically setting the session domain?
Does anyone know a way to dynamically change the session_domain option of ActionController::CgiRequest? I want to have a login section on an index page (www.example.com) that takes a subdomain, username, password, authenticates, then redirects to http://#{subdomain}.mysite.com. I need to set the session_domain option (to the subdomain) dynamically so the cookie can be read when the user arrives
2011 Nov 15
1
Help with "error: no acceptable C compiler found in $PATH"
Dear all, I am trying to install a package from bioconductor (biomaRt) for which I need the RCurl package. I get the following main error message when I try to install RCurl (and its dependencies). configure: error: no acceptable C compiler found in $PATH See `config.log' for more details. ERROR: configuration failed for package ‘RCurl’ I searched for possible solutions and read in some
2005 May 17
7
Basecamp API
Seeing as how the new Basecamp API reflects a similar use of RoR that I have been working on I''m curious as to what we can expect to be extracted from there in 0.13? Was the API written as an ActionWebService or just as a set of controllers? Any generic AR xml parsing/output methods that we may see in 0.13? Any reason you decided to do everything with HTTP Get instead of utilizing
2006 Jun 28
2
simply_restful plugin tests failing???
Has anyone successfully ran the simply_restful tests? Here is how I''m running the tests and the first error. I''m I missing something here? >rails test >cd test >rake rails:freeze:edge >./script/plugin install simply_restful >ruby vendor/plugins/simply_restful/test/routing_test.rb Loaded suite vendor/plugins/simply_restful/test/routing_test Started FFFFF
2007 Apr 30
1
monit config?
Anyone have a a good monit config section for bgrb? I''m thinking something like this: check process backgroundrb with pidfile /var/www/apps/foo/current/log/backgroundrb.pid start program = "/var/www/apps/foo/current/script/backgroundrb start" stop program = "/var/www/apps/foo/current/script/backgroundrb stop" if failed host 127.0.0.1 port 2000 then restart