similar to: Help: How to write tests for a sms service interface

Displaying 20 results from an estimated 600 matches similar to: "Help: How to write tests for a sms service interface"

2008 Jan 08
1
howto rebuild a object from a received xml hash structure ?
im my web server app , i have an action to be used as a REST web service # GET /user/membership.xml?email=emailaddress def membership @user = User.find_by_email(params[:email]) respond_to do |format| format.xml { render :xml => @user.to_xml( :only => [ :first_name, :last_name, :display_name, :membership_type, :membership_at], :skip_types => true)} end end my
2006 Feb 13
1
hackish error handling
I''ve got a block of code that''s turning out.. well - just plain ugly. So i know I must not be doing it the Ruby way. The main problem I''m having is in dealing with handling errors - and just not finding much Rails documentation that gives a deeper understanding of how to handle errors in Rails (outside of several docs on the catch-all''s) the main method
2006 May 10
0
using Rails 1.1 param parsers
Hello, I want to use the new param parsers in Rails 1.1 to process POST''ed xml form data (at the moment I manually parse request.raw_post using REXML). As per Scott Raymond: *"Pluggable parameter parsers* make writable REST web services a cinch. By default, posts submitted with the application/xml content type is handled by creating a XmlSimple hash with the same name as the root
2005 Nov 27
0
How to get raw_post in functional tests
Hi ! I'm testing PayPal integration, and am using the Paypal gem. The Paypal gem requires the raw POST data, and not the pre-munged version that Rails uses. Running in dev mode, everything works fine, but in the tests, I can't seem to get at the data. I did: class ActionController::TestRequest < AbstractRequest #:nodoc: def raw_post raise "RAW_POST Request" end end
2006 Jul 11
1
error when ''Booting WEBrick''
I encountered this problem yesterday so, I decided to build the whole /app directory over but got the same thing again. what I did- I build the MVC files for ''abc'', included abc.rb in /lib, appended environment.rb with ''require abc'' and the service worked fine. And then I did the same for ''xyz'' and ran the server but it failed. both abc.rb and
2006 Jul 10
3
WEBrick start problem
Following is the error I get when I run ''\root\ ruby script\server'' The server does not starts. Any help !?! ------------------------------ => Booting WEBrick... c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:275: warning: already initialized constant KNOWN_OPTIONS c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:280: warning: already
2006 Jun 26
0
error while booting WEBrick server
getting the following when trying to run the WEBrick server: c:\root\ ruby script\server error msg: ---------------------- => Booting WEBrick... c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:275: warning: already initialized constant KNOWN_OPTIONS c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:280: warning: already initialized constant DEF_KEY_ATTRIBUTES
2006 Feb 07
3
Problems with flickr gem: already initialized constant
New to rails so please bear with me. Am having difficulties with the flickr plugin. trying to follow the video as a starter, and keep hitting the following problem when I require ''flickr'' in the environment.rb file testbed:/srv/www/htdocs/carstuff # ruby script/server => Booting WEBrick... /usr/local/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:274: warning:
2006 Feb 12
3
Flickr demo screencast
Hi, I''m new to Ruby and Ruby on Rails. Yesterday I just received the Agile Web Development with Rails book. Now I wanted to recreate the Flickr demo screencast (http://www.rubyonrails.com/screencasts) just for fun to see it live. But unfortunately when I start my server I get some warnings: g5:~/ruby/flickr mw$ ruby script/server => Booting lighttpd (use ''script/server
2006 Jul 10
7
problem with starting WEBrick
Following is the error I get when I run ''\root\ ruby script\server'' The server does not starts. Any help !?! ------------------------------ => Booting WEBrick... c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:275: warning: already initialized constant KNOWN_OPTIONS c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:280: warning: already
2006 May 17
0
Problem with ''require xmlsimple'' in vendor code
Hi there I''m trying to "require ''xmlsimple''" in some code that lives in vendor/ I''ve installed the xml-simple gem, and can confirm this at the command line with ''gem list --local'' which shows I have v.1.0.8 of the gem. However, when I start up lighttpd I get this: /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
2010 Jun 13
1
Using XmlSimple to parse XML strings
I am using XmlSimple to parse an XML string received from a remote host. I am getting the error message, "File does not exist: .". I am fairly well convinced that the problem is that XmlSimple is not recognizing the received XML string as being valid XML and is therefore looking for a file by that name (which, of course, does not exist). The XmlSimple documentation says that it
2006 Jan 19
5
RoR still not working on SuSE 9.0 - incomplete headers received
Hi, I''ve already posted my problem a few weeks ago on several forums, or lists. I still have the same problem: I have a SuSE 9.0 machine, Apache 2.x, ruby 1.8.4 I wanna get RoR working with fastCGI. I have installed different versions of fastCGI, have checked the permissions of the fcgi-ipc directory, reinstalled everything and it still doesn''t work. In the browser window I
2006 Mar 29
4
xmlsimple not found
I''ve been working through the Flickr tutorial, and it looks like I installed the Flickr gem with the require xml-simple gem without problems. But when I got to the point in the demo when it was time to submit the form, I got an error with the message "uninitialized constant Flickr". I did some poking around at the gem repository, and ran ''ruby
2005 Dec 21
8
Incomplete headers
Hi, I wanna use Rails on a SuSE server with apache. Everything should be installed correctly, but when running the application I get this in my apache log: FastCGI: comm with server "/srv/www/htdocs/web4/html/rails/public/dispatch.fcgi" aborted: idle timeout (60 sec) FastCGI: incomplete headers (0 bytes) received from server
2009 May 27
0
request.raw_post into Tempfile
i have flash application ,which will give a jpg file as raw_post from that raw_post i am trying to store into a tempfile tempfile=Tempfile.new("myfile.jpg") tempfile.write(request.raw_post) but always "tempfile.read" giving ""(not storing the data) as output i don''t why ? any help ? -- Posted via http://www.ruby-forum.com/.
2006 Feb 04
0
XmlSimple vs XML::Simplel?
Greetings! I have a bunch (thousands) of XML files that I want to process. I want to extract a limited set of data from each and put that data, along with the XML file''s id, into MySQL so that users can do a structured search for (and thus retrieve) specific XML files.. I''ve got some Perl scripts I put together using XML::Simple to do the extraction of the data into CSV files,
2008 Jul 09
2
setting request.raw_post with rspec-rails
... is there a way to do this? We have some REST-ish POSTs we''d like to spec out. In the controller this gets accessed with request.raw_post.to_s, is there a way to set this with rspec? Thanks as always, Francis
2009 May 09
0
XMLRPC raw_post getting run through Hash#from_xml
Im trying to create an api, and Im having trouble getting ActionController to not run the raw post data through Hash#from_xml (request.parse_formatted_request_parameters) for the XMLRPC post data. I essentially want it to run through XMLRPC::XMLParser::REXMLStreamParser.new.parseMethodCall(request.raw_post). However, I can''t figure out a clever, clean way to get
2006 Sep 19
1
No request.raw_post when using RJS template?
Hi all I wanted to try out the RJS thing for updating more than just one HTML element using AJAX. I have a selection like that: <select id="booking_musician_profile_id" name="booking[musician_profile_id]"> <option value="4" selected="selected">Danc!ng TortoYse</option> <option value="2">DJ Psyhigh</option>