Displaying 20 results from an estimated 1000 matches similar to: "Functional test and flash with an error"
2008 Apr 01
1
Navigation Problems
Hi,
I am having problems with my page. I have a banner and navigation bar in
controller_name.rhtml in app/views/layout. Can someone please help?
Thanks
In the navigation bar, I have the following links:
Category1
Sub-Category1
Sub-Category2
Sub-Category3
Sub-Category4
Sub-Category5
Sub-Category6
In the main content, I have the following links:
Sub-Category1 edit delete
2006 Mar 15
4
sub-selection with $
Hello,
I have 2 navigations ( mainnav and subnav ) with 2 lists
List have same names ( li0 li1 li2 )
What is the best way to select li1 of subnav with prototype 1.4 in this
case ? I just want to hide/show it
Thanks
<div id="mainnav">
<ul>
<li name="li0"><li name="li1"><li name="li2">
</ul>
</div>
<div
2005 Dec 23
1
Salted Login Error
Anyone know what''s causing this?
------------------------------------------------------------------------
1) Error:
test_delete(UserControllerTest):
NoMethodError: undefined method `advance_by_days='' for Time:Class
./test/functional/user_controller_test.rb:132:in `test_delete''
2) Error:
test_signup(UserControllerTest):
NoMethodError: undefined method
2006 Mar 28
1
simple output string
Hi!
I am new to Rails and wanted to know how I can print an easy
string-line.
I wanted to generate a dynamic title for my blog articles made with
"typo":
The first part of the html-title stays the same:
<title>softrockcookie</title>
if it is not the mainpage ("softrockcookie") it shall add the
page_title, so:
<title>softrockcookie <%= page_title
2006 Mar 01
5
scaffold.css and Rails tutorial problem
In iteration D.1 on page 109 I am not getting a styled error message box
displayed at the top of the checkout as described in the tutorial and I
cannot seem to discover where I have erred.
The scaffold.css is copied from the pragmatic programmers site:
#--------------------------------------------------------------------
$ cat public/stylesheets/scaffold.css
body { background-color: #fff;
2005 Jul 05
2
Salted hash login generator (verification problem?)
Hi all,
I hope someone can help with what is probably a simple newb
installation mistake on my part. I''m having a couple of problems with
the salted hash login generator. I installed it following the
quickstart guide, and the unit tests work like a charm. There are two
errors and a failure on the function tests, though; the verified field
seems to be involved in at least one of
2006 May 11
1
RoR completely ignoring a column when saving changes
I have an action that needs to update two models/two tables in one shot,
and it works great, but ignores one column. Here is the action code:
(verify_id is irrelevant in this case)
[CODE]
def edit
@page_title = "Edit User"
@page_active_3 = "active"
if request.post?
@user = User.find(params[:id])
@profile = @user.profile
verify_id(@user.id,
2008 Jun 02
1
Looking for help on two issues with Rails 2.1 and RSpec 1.14
I have specs that ran fine in Rails 2.02/RSpec 1.13 that are failing on
Rails 2.1/RSpec 1.14.
There is one problem and one issue:
problem: sometimes (but not always) I get a NoMethodError referencing a
has_many association
issue: in helper specs, instance variables don''t get set unless the
HelperModule is included. Using the preferred helper.<method> I can''t seem
to
2006 Mar 19
2
Unit test confusion
Hey all,
I''m following along with AWDWR, specifically the unit testing.
On page 148, it shows you how Test::Unit::TestCase will automatically
define instance variables based on your fixtures.
It doesn''t seem to actually work, though. It seems that both @artists
["beatles"]["name"] and @beatles.name are nil objects in my test,
where as
2006 Mar 07
2
ipw can not work in adhoc mode
See atttachment.
I have already submit this bug via "report a bug" in Nov last year, but
no reply, and the problem still exist in stable-6 now.
Any one who knows how to solve this problem ?
Thanks...
-------------- next part --------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2006 Jul 26
4
yhtml plugin
I have released a yhtml plugin, which is available at
http://http://svn.visualjquery.com/admin_console/trunk/admin_console/vendor/plugins/yhtml
You can also get my other plugins, specificlly: the pre-alpha
administrative console (AJAX-based scaffolding engine),
acts_as_automatic, which allows you to define associations in a single
yaml file, and not need to define has_many, has_one,
2006 Aug 11
5
Unit tests - NilClass problem
Hi!
Yesterday I started to write my unit tests for the fist time using
rails. I''m using this method:
http://blog.codahale.com/2005/12/23/a-rails-howto-simplify-your-unit-tests/
My customer_test.rb looks like this:
require File.dirname(__FILE__) + ''/../test_helper''
class CustomerTest < Test::Unit::TestCase
fixtures :customers
# Replace this with your real
2006 Jun 08
1
fixtures instance variable naming
hi all,
trying my first foray into testing and having trouble with accessing
the fixture instance variable
built a test for my NewsRelease model.
have a news_releases.yml as a fixture with:
first:
id: 1
title: my first release
body: this is still my first test of a news release
publish: 0
date_publication: 2006-06-06 17:28:00
in news_release_test.rb, i have
def setup
2012 Mar 16
0
Rails tests failing
http://dl.dropbox.com/u/15024055/CloudShot/shot_15032012_232654.png
if i write the test like this its working just fine it passes green
[code]
it "should have the right title" do
get ''view''
response.should have_selector(''title'',
:content => "View Snippets")
end
[/code]
but for
2008 Mar 01
0
Fixtures in ActionController::TestCase
Hi guys,
Need some help.
I am using Rails 2.0 and while writing functional test, I encountered
the following problem
class UserControllerTest < ActionController::TestCase
fixtures :users
...
def do_something
attempt_login(users(:valid_user)) # assuming valid_user is a
proper line in
...
end
def attempt_login(user)
post :login, :user => { :login => user.login, :password
2010 Jul 25
0
Testing problems: ActiveSupport
Hey everybody,
I am trying to test a small application with a simple testing, but I get
the following errors while using Aptana 2.0.5 with Ruby 1.9.1 and Rails
2.3.8(I know why I get the first one, but I''m not sure about the
ActiveSupport errors):
Exception: undefined method `screen_name'' for nil:NilClass
2011 Sep 04
4
same html elements rendering twice on page
hey all,
My index.html.haml:
- wrap do
- page_title "Teams List View"
application_helper.rb:
def page_title(title)
content_tag :h1, title
end
def wrap(&block)
concat(content_tag(:div, capture(&block), :class =>
"generic_header"))
end
I load in browser and get:
<div class="generic_header"><h1>Teams List
2007 Jun 19
1
javascript_tag replacing whitespaces w/ '%20'
javascript_tag replacing whitespaces w/ ''%20''
Hello,
I have a form that tests if a title has been changed since the page
was loaded and the page has been submitted. If the page title has been
changed then a confirm box will ask if the user wants to have the title
changed. The problem is if the person hits cancel, all white spaces
in the title get replaced w/
2006 Jul 24
1
All functional tests fail with RoutingError
All,
I''m using InstantRails 1.0 on Windows XP and all my functional
(controller) tests fail with ActionController::RoutingError, although
the actions work OK through a web server/browser. Here''s an example of
an error:
1) Error:
test_create(AdminControllerTest):
ActionController::RoutingError: No url can be generated for the hash
{:controlle
r=>"admin",
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''