similar to: functional tests, assert_tag and tables

Displaying 20 results from an estimated 900 matches similar to: "functional tests, assert_tag and tables"

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
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 Dec 15
4
Order of tests matters???
I have a problem with tests. I always thought that the order of tests doesn''t matter because the fixtures are reloaded before every test method. However, I''ve just discovered that this isn''t true. This is a quote from the "Guide to testing the rails" howto: "... if we had another test method, we wouldn’t have 10 users on the 2nd test because they would
2006 Feb 18
1
Should assert_tag be used to test rxml views?
I''m getting strange errors attempting to test an rxml view with assert_tag. I can see that what the view is producing is correct but I get an error like "ignoring attempt to close foo with bar" (where bar is a tag which is meant to be nested in foo). Is asssert_tag meant for xml, or just html? Cheers, Robert. -- Posted via http://www.ruby-forum.com/.
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 Jul 13
10
Problem with flashes staying on between pages
I have a login page that redirects to itself if the login is incorrect. The browser does: get login post login, with wrong username and password redirect back to login When the post action redirects back to login it sets a flash telling the user it failed. So far so good. The problem is that if I get another page after that, the flash is still there. It only disapears on the second.
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
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 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
2007 Mar 23
2
assert_select VS assert_no_tag
Hi everybody. Assert_no_tag will be deprecated soon. How can i use assert_select for checking not existed tag? Thanks. Bye. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To
2007 Mar 22
1
Functional test and flash with an error
I''m getting this error thats moaning about expected tag, but no tag found matching {:content=>"User James Apps was successfully created.", :attributes=>{:id=>"notice"}, :tag=>"div"} in the file application.rb. I tried using a regular expression - /#{user.first_name}/ , but that wouldn''t work either user_controller_test.rb 1) Failure:
2013 Feb 27
1
some help in using the package NUT in a perl script
Hello, I want use the package NUT in a script perl, i wonder how use the result of method such as BattPercent() for example. here is my code : _#!/usr/bin/perl -w_ _# server_ _use strict;_ _#use /etc/nut/dev/modules;_ _#use IO::Socket::Multicast;_ _use UPS::Nut;_ _my $message = localtime;_ _$message .=" `who` . n";_ _print "-- test : $message n";_ _my $ups = new
2006 Jun 14
0
Functional test problem
Embarrassingly late (apps already well advanced), have decided top get to grips with testing and am having a week hopefully covering everything I''ve already coded (so far it''s been worth it -- found a couple of bugs might not have found otherwise). But having a bit of a prob with a functional test. I''m trying to enumerate through through a list of users in a
2007 Jan 11
0
writing tests for rescue_action_in_public
I''m having trouble with rescue_action_in_public, both in getting it to work right in my rails app, and in writing tests to make sure. What I ultimately want to do is test for what a normal user would see when an error is trapped. I override local_request? like so: application.rb -------------- def rescue_action_in_public(exception) render :text => "oops" end def
2006 Feb 13
9
Selenium. Replacement for traditional rails functional test?
Hi list I''ve got a bit of a philosophical question. After just having discovered Selenium /Selenium IDE and the rails selenium plugin I''ve realized that it''s a whole lot easier to do functinoal testing than writing the traditional rails functional tests. However it implies that the development database consists of standardized test data (e.g the test & dev
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
2006 Dec 04
5
ruby on rails ecommerce tests are failing, but why?
i am working through the Beginning Ruby on Rails Ecommerce book and on page 101 where it is talking about integration tests, i run test/integration/book_test.rb and it fails giving me the following error message: 1) Failure: test_book_administration(BookTest) [test/integration/book_test.rb:45:in `add_book'' test/integration/book_test.rb:11:in `test_book_administration''
2005 Mar 23
2
0.11 problems
I''ve upgraded to 0.11 this morning specifically to test out the pagination stuff. When that didn''t work (didn''t recognise the command) I deleted my project and recreated from scratch. So in short rails projectname cd projectname edit config/database.yml (my database is postgres by the way) ruby scripts/generate model Recordtype ruby