Displaying 20 results from an estimated 1100 matches similar to: "scaffold code fails functional test?"
2006 Jan 10
0
Changing scaffold''s text_field to a password_field causes white screen of death in mozilla?
I had posted earlier about ''silent failure of a controller'', what seemed to
be an intractable problem where I was getting failure of a particular action
in a controller while others worked. What was irritating was that there were
no useful messages. Nothing to the browser, nothing in logs, and even the
breakpoints wouldn''t hit. Finally by a process of elemination I found
2006 Jun 16
0
FW: Ajax used for the Yamanner virus
Just in case you didn''t hear about this.
---------- Forwarded message ----------
From: Babu, Shaurya <Shaurya.Babu@qwest.com>
Date: Jun 16, 2006 8:53 AM
Subject: FW: Ajax used for the Yamanner virus
To: Bakki Kudva <bakki.kudva@gmail.com>
FYI
_____________________________________________
Hi Guys,
A first! for the pitfalls of Ajax, if used indiscriminately:
2006 Jan 05
1
Action fails silently - breakpoint doesn''t hit
I have a simple user registration controller with scaffold code. The
only change I made to the view is to add a second password field for
confirmation. I do have a db table called users with all the fields
except ofcourse the extra password field. The field has a different name
so it does not get into the user hash. The ''user.new'' action works fine
and displays the form. The
2006 Apr 23
4
Ruby, Rails & Linux - Which distro
Did I sound like our President? :)
<spin>
I didn''t explain myself well. I am not thinking of buying the
identically equipped PC laptop either at the same price.
If I had a $2500-$3000 budget (laptop, Applecare + case etc) I might
consider the Mac, but then in the PC laptop universe there are more
options of going with the slower processors (T2300 or T2400) for about
$1,000 less
2009 May 18
0
[PATCH server] fixed functional tests after recent controller refactoring and managed node controller fixes.
Signed-off-by: Scott Seago <sseago at redhat.com>
---
src/test/functional/host_controller_test.rb | 41 --------------------
.../functional/managed_node_configuration_test.rb | 14 ++++---
src/test/functional/nic_controller_test.rb | 8 ----
src/test/functional/permission_controller_test.rb | 15 ++++---
src/test/functional/quota_controller_test.rb | 2 +-
2006 Feb 01
3
Test data life cycle confusion
Hi,
It states on page 140 of Agile Web Development with Rails:
Here?s the bottom line: even if a test method updates the test database,
the database is put back to its default state before the next test method is
run. This is important because we don?t want tests to become dependent
on the results of previous tests.
Well, I''ve been running into a brick wall with some functional tests
2006 Jun 05
0
asheville.rb
I am looking to start an Asheville.rb group for Rubyists and Railers
in the Asheville, NC area. Any one interested, please contact me on
this thread or off list.
Thanks,
bakki kudva
2006 Feb 08
0
subversion AND gem rails howto?
I have been using rails on Debian Sarge since May of last year. I initially
gem installed rails as root and since then I have been gem updating the
installation. I have had no trouble with the installation or development.
Now feel that I''d like to use svn to get edgerails to be able to use nifty
features such as RJS. Some of the threads on the subject talk about
svn:externals in the
2006 Jan 22
0
Seperation of application specific view/controller stuff
[I posted to Rails Engines Forum but didn''t get a response so I am posting here]
I installed both login and user engines and got them working. Thanks for
an excellent job! Now, I have some questions on how to customize them
without breaking the code or making future upgrades messy. I have
several questions and any help will be greatly appreciated. I am
designing a student registration
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 Jan 10
7
Can only render or redirect once per action - why?
I ran into this error message a quite a few times since my app requires
branching to different pages from the same action... say using a switch
statement. Ofcourse I found that you can use multiple redirects or renders
if you do
render :action => ''new'' and return false
I hate to code something I don''t understand fully. Any explanation of this
will be greatly
2006 Jun 27
2
testing - how to get access to an instance variable
inside controller
def foo
@city = City.find(@params[:id])
@city.bar = 1234
end
While writing functional tests how do I ensure that the @city.bar is 1234?
def test_edit
get :edit, :id => 1
assert_not_nil assigns(:city)
#?? how to assert that city.bar is 1234
end
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
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
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 Mar 20
2
Testing Models And Fixtures
I have finally decided to look into testing and I am going through
the examples in the AWDWR book and I tried the following and it does
not work... even though I don''t see why it shouldn''t.
===========
posts.yml
===========
basic_post:
id: 1
title: Title
body: Body
created_at: 2006-02-01 00:00:00
updated_at: 2006_02-02 00:00:00
2006 Jul 06
6
Functional tsts
Hi all,
I have created projects module in my application using scaffold,
and it created me everything, and all the modules are working except the
functional test. This is the error
1) Failure:
test_create(ProjectsControllerTest)
[test/functional/projects_controller_test.rb
:55]:
Expected response to be a <:redirect>, but was <200>
8 tests, 25 assertions, 1 failures, 0
2006 Apr 16
5
Newbie Problems with pluralization
Hi,
I have a many to many relationship incorporating the following tables:
taxes --> taxes_tax_groups --> tax_groups
I have a model named tax with the following declaration:
has_and_belongs_to_many :tax_groups
and I have a model named tax_group with the following declaration:
has_and_belongs_to_many :taxes
I am attempting to run the following unit test:
require
2006 Oct 21
6
test_create gets 200 instead of :success
Help!
I have a new/create process that works fine in the actual app. But when
I test I always get a failure in the test_create section. Here''s some
controller code:
def new
end
def create
begin
@borrower = Borrower.new(params[:borrower])
if @borrower.save
flash[:notice] = ''Borrower '' + @borrower.FirstName + '' '' +
2005 Feb 19
0
[Error] Using validates_presence_of for datetime field causes parse error?
Hi Everyone -
I''ve got an odd sort of error when I try to use validates_presence_of
for a MySQL ''datetime'' field. Here''s the relevant portion of the table
definition:
mysql> describe student_surveys;
+---------------------+---------------------+------+-----
+---------------------+----------------+
| Field | Type | Null |