similar to: Should assert_tag be used to test rxml views?

Displaying 20 results from an estimated 1000 matches similar to: "Should assert_tag be used to test rxml views?"

2006 Jul 07
2
Testing views with Hpricot
assert_tag smells bad. Hpricot smells nice (apricotty!). Testing your views with Hpricot: http://www.lukeredpath.co.uk/index.php/2006/07/07/testing-your-rails- views-with-hpricot/ Big thanks to _why for a great little library! Feedback is appreciated. rSpec integration coming soon (hopefully!). Cheers, Luke Redpath contact@lukeredpath.co.uk -------------- next part -------------- An HTML
2005 Nov 23
2
functional tests, assert_tag and tables
I''ve run into another functional testing issue. Odds are I''m taking the wrong approach, so I''m back to this list again in the hopes of finding the true path. with assert_tag, I''d like to check the values of various table cells and ensure that the proper values are placed in the appropriate places. I written some tests that make good sense to me, and in
2006 May 04
6
second assert_tag failling in rails integration test
Hi all, I''m fairly new to rails and ruby, but I''ve come across an interesting glitch and I''m not sure whether I''ve just got something wrong with my assumptions or if it really is an error in the underlying framework... I''ve created a bare-bones set of tests to show you where the problem is. What follows are the steps I went through to reproduce the
2005 Nov 16
19
Concerns over Rails' handling of tests
Sorry if this comes across as a bunch of disjointed thoughts...I''m just trying to put my thoughts down and I''d like to know what other people''s opinions on the subject are. I''ve been working with Rails for 3 or 4 months now and I''m constantly trying to look at ways of improving my testing techniques, especially when it comes to TDD. I have a few
2007 Jan 24
7
Differences between assert_tag and assert_select
Hi all, I can't seem to make assert_select work for the more complex cases for me. Here's a sample: # View <%= link_to_remote 'Add new', :url => new_phone_url, :submit => 'phones_head' %> # Generated code: <a href="#" onclick="new Ajax.Request('http://test.host/admin/parties/phone/new', {asynchronous:true, evalScripts:true,
2006 Aug 14
0
anyone else having trouble with assert_tag :content ?
Hi everyone, In an integration test I have assert_tag :content => /Quantity/ and this always fails, even though Quantity does exist in the html. Similarly, I have assert_no_tag :content => /Quantity/ , and this fails even when Quantity *doesn''t* exist in the html. Am I missing something here? Thanks Daniel
2005 Nov 03
1
Builder / rxml views: hyphens in XML element names
I''m having a strange problem with an rxml view - it won''t let me put hyphens in the names of XML elements. The original problem line was: xml.VISA-SSL do But in any other place, if I insert a hyphen into the name of any arbitrary element, I get the following kind of error: undefined method `theTextAfterTheHyphen'' for #<#<Class:0xb7617180>:0xb7616f28>
2006 Jul 20
2
Why is my rxml view being wrapped by the rhtml template in views/layouts?
Why is my rxml view being wrapped by the rhtml template in views/ layouts? I was experimenting with REST, I had a nice little test program with one table: ''resources''. Here''s what the show method looks like: def show @resource = Resource.find(params[:id]) respond_to do |accepts| accepts.html accepts.xml end end I have a show.rhtml
2006 Mar 04
13
Using helpers from controllers ?
There is a solution to use helpers from controllers ? I have an error : |undefined method `content_tag''| class ApplicationController < ActionController::Base def test return content_tag("a","test") end end
2006 Aug 07
1
Testing & xml
Probably dead obvious, but are there any assertions for easing testing of xml output, both for builder templates (for RSS feed -- something like a version of assert_tag) and for the new restful stuff. Couldn''t find anything relevant in the API. Cheers Chris
2006 May 16
3
Testing How To Question
I''m using the functional test for a method like this: def test_create post :create, :phase => ''copynew'', :id => 1 assert_response :success assert_template ''create'' assert_tag :content => ''New Item'' assert_not_nil @item end This posts a request to the create method in the controller. Is there any way to look
2005 Oct 10
1
ActionPack tests are failing
Hi, i''m currently looking into a problem with the tests for ActionPack. 127 of them are failing on my windows machine. On Linux everything is working fine so far. I just wasted a good part of an hour trying to find the problem on windows...the solution is: Nitro and not Windows. I''m using Edge Rails and have no rails gem installed. On Windows I have the Nitro/Glue/Og gems
2006 Feb 21
26
Net::SMS::BulkSMS 0.1
This is the first release of a new Ruby library for the www.bulksms.co.ukAPI which should allow simple integration of SMS functionality into your Ruby or Rails apps. Sending a message is as simple as: @service = Service.new(''username'', ''password'') @service.send_message(''This is my message!'', ''4479123456789'') # whats my
2006 Feb 18
3
Edit in Place
I need help using In Place Editor by script.aculo.us #controller def my_action #get the text to display initially @fancy_text = "Some fancy *bold* and _emphasized_ text." end def update_text #save your text here, and return the saved value @fancy_text = params[:value] render :layout => false, :inline => "<%= textilize( @fancy_text ) %>" end
2006 Jun 15
5
[Fwd: Functional test problem]
Anyone? -------- Original Message -------- Subject: Functional test problem Date: Wed, 14 Jun 2006 19:49:03 +0100 From: Chris T <ctmailinglists@gmail.com> Reply-To: ctmailinglists@gmail.com To: rails@lists.rubyonrails.org Embarrassingly late (apps already well advanced), have decided top get to grips with testing and am having a week hopefully covering everything I''ve
2006 Feb 17
7
Rich Text Editor (RTE)
Hello, We are developing an commercial application that need to use an RTE. Someone know one RTE editor that can I use in an commercial application? We need basic functions to format paragrapher, bold, italic, ... I found FCKEditor but it is very expensive and weight. I found this list too but don''t know what is trustful: http://www.geniisoft.com/showcase.nsf/WebEditors Some
2006 Jun 29
2
Random routing errors in 1.1.3 with Mongrel
Since upgrading to 1.1.3 on our dev box, we''ve started to see random routing errors with our apps running under Mongrel in production mode. The errors seem to go away after a while but come back everytime we restart the server. This may be a mongrel problem, it may be a rails problem (I''ve posted a bug on the trac) and I was wondering if anybody else had had similar
2008 Apr 20
1
Why is respond_to always rending the RXML view?
I''m having a problem in Rails 2 where respond_to is always rendering the RXML view even in the HTML rendering response. Can anyone tell me why this might be happening? Here''s a code snippet: respond_to do |accepts| accepts.html accepts.xml { render :action => ''show.rxml'', :layout => false} end If I change this to the following it works fine:
2007 Jun 26
0
Best way to render KML files using RXML templates
I want to produce google maps KML files which are baiscally XML files with a KML extention. I''m using restful routes and respond_to. The best way I''ve found is to use respond_to do |format| format.kml { render :action => "kml" } will render a kml.rxml template I have but really I want to have action.rxml rendered for kml files. Is there are way to acheive this,
2006 Aug 30
1
Shouldn't rxml files be exempt from layout by default?
RJS templates are the only template type that are exempt from layout by default. Don''t you think it makes sense to add rxml to the list of exempt extensions? I''d assume most people would be surprised to see their XML embedded in the middle of their (most probably) rhtml layout. http://dev.rubyonrails.org/svn/rails/trunk/actionpack/lib/ action_controller/base.rb: