Displaying 20 results from an estimated 200 matches similar to: "Agile Web Dev unit test fails with fixture instance variable"
2006 May 19
3
new to rails; problem with testing section in Agile book
Hello, I should give the expected disclaimer that I am brand new to
rails and am going through the Agile web development with Rails book
right now. I am in the testing section and I can''t get past an error.
this is my cart_test.rb test file:
require File.dirname(__FILE__) + ''/../test_helper''
class CartTest < Test::Unit::TestCase
fixtures :products
def setup
2005 Dec 23
6
Agile book - test error
Hi all,
I get an error when testing the "store_controller_test.rb"
The troublesome line is in the test below:
def test_add_to_cart
get :add_to_cart, :id => @version_control_book.id <<<
cart = session[:cart]
assert_equal @version_control_book.price, cart.total_price
assert_redirected_to :action => ''display_cart''
follow_redirect
2006 Jun 24
1
@version_control_book not available while testing - AWD book 1 page 148
In the page 148 of the AWD book it''s mentioned that the while testing
@products and @version_control_book are automatically made available.
That''s not the case with me. In my test environment I don''t get those two
variables.
I was wondering if anything has changed in Rails 1.1 because in the new
edition of the book (AWD - edition 2) there is no mention of such
2006 Mar 04
2
unittest, not loading yml data
Here is my products.yml
version_control_book:
id: 1
title: Pragmatic Version Control
description: How to use version control
image_url: /images/sk_svn_small.jpg
price: 29.95
date_available: 2005-01-26 00:00:00
automation_book:
id: 2
title: Pragmatic Project Automation
description: How to automate your project
2006 Mar 09
4
Strange Unit Testing error - newbie question
I''m fairly new to Rails, and I''ve been learning from AGILE WEB
DEVELOPMENT WITH RAILS. Everything has been going smoothly until the
chapter on Unit Testing, where I''m getting some strange errors.
I''m up to page 141 in the Agile book, and attempting to run the test
program containing the method test_read_with_hash. The previous tests
work properly, but I
2006 Apr 21
2
NoMethodError with test_read_with_hash
While running the product_test.rb test fixture in the Agile Web
Development book (p. 148), but when I run
ruby test/unit/product_test.rb, I get the following error:
1) Error:
test_read_with_hash(ProductTest):
NoMethodError: You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.[]
2004 Feb 09
0
Samba authentication against an NT group in Apache
We would like to have our Apache Linux-based web server use our
existing NT domain to authenticate some of our web pages. We are using
the Apache module mod_auth_pam to use pam-based authentication and
then the winbind pam module to do the actual authentication.
We have gotten to the point where we can authenticate using NT
_users_, but we have not been able to authenticate using _groups_. For
2004 Mar 10
0
Samba authentication against an NT group in Apache
Hi,
I have exactly the same problem with my web server ...
Linux/redhat 9.0 / kernel 2.4.20-20.9.1 (+ Acl patches)
Samba 3.0.2a / compiles with winbind and Acl options
Apache 2.0.40 / with mod_auth_pam 2.xx included
Authentication to samba share from a windows workstation using Acl + winbind
+ "Nt domain groups" works fine.
But I gave some problems when I want to use NT domain
2015 Nov 04
2
[PATCH] tests/c-api: cache available features
Build a list of all the features used in action tests, and lazily read
them as needed. This reduces the number of guestfs_feature_available
calls for a full run from 117 to 18.
---
generator/tests_c_api.ml | 77 +++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 73 insertions(+), 4 deletions(-)
diff --git a/generator/tests_c_api.ml b/generator/tests_c_api.ml
index 6be753f..8c4e5ef
2005 Dec 30
1
Problems with Testing (Depot) demo app in Agile Rails book
I''ve encountered a perplexing problem whilst following along the demo
app in the "Agile Web Development with Rails" book. Any help would be
greatly appreciated. Here is a brief time line of my tale of woe:-
0. Been programming (business apps) and designing/building DBs for two
decades - but new to both Ruby and Rails (so I apologise in advance if
I''ve made some
2004 Oct 02
12
[Bug 938] "AllowGroups" option and secondary user's groups limit
http://bugzilla.mindrot.org/show_bug.cgi?id=938
Summary: "AllowGroups" option and secondary user's groups limit
Product: Portable OpenSSH
Version: 3.9p1
Platform: ix86
OS/Version: Linux
Status: NEW
Severity: major
Priority: P2
Component: PAM support
AssignedTo: openssh-bugs at
2006 Jul 06
0
problema con i test automatizzati
ciao a tutti.
come al solito, sto andando avanti a piccoli passi nel creare
l''applicazione depot del libro "Sviluppare Applicazioni Web con Rails".
Ora mi trovo nella fase di creazione dei test automatizzati.
Ma c''è una cosa che proprio non capisco:
Ho la seguente classe in ~/depot/test/unit/product_test.rb
require File.dirname(__FILE__) +
2006 Jan 14
0
testing template components
Hi,
I''m plowing through the template section of "Agile Rails", specifically the
stuff starting on P. 364. What is a good strategy for testing components?
My initial thought is to mimic the Rails application "test" directory. No
problem.
Next copy the setup method, and set it up like so -
class SidebarControllerTest < Test::Unit::TestCase
def setup
Can not test if model name is Tester in rails 2 (ArgumentError: wrong number of arguments (0 for 1))
2007 Dec 18
0
Can not test if model name is Tester in rails 2 (ArgumentError: wrong number of arguments (0 for 1))
I''m using rails 2.0.1 now. Here is the step for generate the error
1. Create rails project name demo
"rails demo"
2. I create model name "Tester" using command
"ruby script/generate model Tester name:string description:text"
3. create database (after change username and password)
"rake db:create:all"
4. migrate database, both development and
2006 Apr 28
0
Ferret failing to rebuild_index - occasionally unable to delete a file (_j.cfs)
I''m switching all my fulltext searching over to ferret using the
acts_as_ferret plugin on windows (for development, will be deployed on
linux).
In my tests I have a setup method as follows to ensure the index is
reset for each test:
def setup
Item.rebuild_index
end
This works fine for the initial few tests but then suddenly fails for
the last few tests when it seems to be
2006 Apr 28
5
Ferret failing to rebuild_index - occasionally unable to del
I''m switching all my fulltext searching over to ferret using the
acts_as_ferret plugin on windows (for development, will be deployed on
linux).
In my tests I have a setup method as follows to ensure the index is
reset for each test:
def setup
Item.rebuild_index
end
This works fine for the initial few tests but then suddenly fails for
the last few tests when it seems to be failing
2014 Oct 23
17
[PATCH 00/16] Small bits of non-Linux porting
Hi,
from time to time, there have been requests (or attempts, like the
mingw port posted on the list some months ago) to make libguestfs work
on OSes different than Linux. Of course this would imply using a fixed
appliance, since it is currently heavily dependent on Linux.
The attached series provides some easy changes in this direction,
resolving some of the easy issues found in porting to
2006 Jan 30
5
Functional tests and dealing with login before_filter
Hi all,
I''m curious as to how you do functional testing on the controllers if, within
the ApplicationController, I have a before_filter :authorize, :except =>
:login, where the private authorize method checks for session[:user].
I can''t do "post :login", because that method is in a different controller.
I tried setting session[:user] directly in the setup
2007 May 27
1
annotate_models plugin to annotate RSpec specs and fixture
I have found useful to have the table information associated to models
disp?ayed in the models and fixtures files of my rails applications.
If you want to add this information to the spec_fixtures and specs add
the following patch to your plugin.
Index: vendor/plugins/annotate_models/lib/annotate_models.rb
===================================================================
---
2006 Aug 10
0
Load a fixture manually in setup?
I''m running into a problem where one of my fixtures uses ERb to get an
id for a row that isn''t created yet. In setup, I create that row. Since
it appears that fixtures are loaded before setup is run, that''s a
problem.
I can''t put the row creation in a fixture - its part of the business
rules of one of my models.
Anyone know how to load a fixture manually