similar to: Unit test confusion

Displaying 20 results from an estimated 3000 matches similar to: "Unit test confusion"

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 + '' '' +
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 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
2011 Jan 06
3
dovecot can't see mail that is there
I used to install dovecot on any Fedora fresh installation and I could fetch my internal mail few minutes later. Now I've been struggling for two days and I haven't got my mail working yet. I have Fedora 14 with sendmail. Some application on the same machine send mail to an account on the same machine (hence all is confined to one machine) and I want to retrieve it from a laptop
2006 Jun 08
2
accessing fixtures in tests
hi all, my first attempt at tests and i''m having trouble accessing the fixture values, if anyone can make it suggestions. i have news_release_test.rb, using new_releases.yml as the fixture file according to the agile book, i should be able to access the fixture properties within my test as such: assert_equal @first_test.id , @news_release.id unfortunately, i try that and get:
2006 Jan 03
3
Rails Noob Question
Apparently the first time I posted this, it was tacked onto the end of another thread. Please pardon my repost. Won''t happen again. -------- Howdy. I''m just getting into Rails, and really enjoying it! I''m coming from the .NET world, so I''ll embarrassedly admit that I''m running it on winXP and even using SQLServer (for now, may switch to mysql
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 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 Apr 14
2
Legend in xyplot two columns
Dear R-Help I have some trouble to set the legend in a xyplot into two rows. The code below gives me the legend in the layout I am looking for, I just rather have it in two rows. library(lattice) schluessel <- list( points=list( col="red", pch=19, cex=0.5 ), text=list(lab="John"), lines=list(col="blue"),
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",
2014 Mar 31
0
[PATCH] Fix encoding issues, add news and artists
This patch fixes a few non-ASCII characters which were displayed wrong, adds news about Pono and adds a few artists to the links page --- comparison.html | 10 +++++----- feeds/feed.xml | 18 +++++++++++++++++- links.html | 3 +++ 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/comparison.html b/comparison.html index 8e6b74b..daa0906 100644 --- a/comparison.html +++
2006 May 05
3
posting xml in functional test
Hello, I''m trying to write a functional test for a simple CRUD controller which accepts / emits xml in a REST- like fashion. However the following code won''t work for me - an exception is generated def test_create post :create, ''<person><name>john</name></person>'',
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 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__) +
2007 Jul 24
2
Astribank-8BRI
Hello, I'm in the process of building an Asterisk machine and need 5 or 6 BRI-Channels. I was looking for the beroNet and Junghans cards and stumbled upon the Xorcom Astribank xBRI products. Has anybody tried out the Astribank xBRI-Channel Banks? Are they production ready or should I go with a beroNet BN8S0 or JUNGHANNS.NET octoBRI ISDN? Thanks in advance, Lars -- We don't like their
2005 Oct 28
2
Accessing fixture
I have a very simple problem. I can''t seem to access a the fixture by name I have a sites.yml with: simple_site: id: 1 name: demo description: A demo site created_on: 2005-10-25 00:00:00 updated_on: 2005-10-25 00:00:00 And I have a test class as: require File.dirname(__FILE__) + ''/../test_helper'' class SiteTest < Test::Unit::TestCase fixtures
2006 May 05
7
Testing model: test becomes dependent on previous test
Im having trouble with Testing models. im following the tutorials in the book Agile Web Development with Rails. if i execute the code product_test.rb, i get this error: ============================================================ 1) Failure: test_update2(ProductTest) [test/unit/product_test.rb:30]: <29.95> expected but was <99.95>. 3 tests, 11 assertions, 1 failures, 0 errors
2002 Sep 01
1
floating point exception in 1.0
alpha 21164 (EV56) debian unstable debian's vorbis 1.0 beatles yellow submarine track 9, "sea of holes" 96% of the way through i get a floating point exception. reproduced twice in a row. if a developer does not have a copy of this fine album, i can upload the wav file. ~jeffrey :j --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: