Displaying 20 results from an estimated 6000 matches similar to: "Testing problem"
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
2007 Dec 11
3
Transactional/Rollback problems
I''m having a rollback problem with rspec trunk. It doesn''t seem like
rollbacks are happening quite as often as they should be. It
appears as though the rollbacks are *NOT* occurring on the first
description block in a file, but are for the rest. Here is a set of
specs that are failing:
require File.dirname(__FILE__) + "/../spec_helper"
describe
2006 Mar 10
2
rake fails on build server, but not in development
I''m working in a development environment of Mac OS X with MySQL, and a
production deployment environment of Redhat with Oracle XE. In the
course of setting up a new continuous build server that more closely
mimics our production environment, I got stuck on the following
strangeness on the build server (Linux, Oracle).
1. rake fails
2. rake test_units works
3. rake test_functional
2007 Oct 08
3
test not rolling back
For testing, I use:
self.use_transactional_fixtures = true
This should cause a ROLLBACK for each test case. If I run a single
file, foo_controller_test.rb, it works as expected. I see BEGIN and
ROLLBACK 8 times in the log files. But if I run:
rake test:functionals
I get 3 COMMITs, 196 BEGINS and 193 ROLLBACKs. The code in fixtures.rb
that deals with this is :
def
2007 Oct 22
13
An error on edge at -r 2767
Morning,
Having done an svn up this morning all my specs are broken with the
following:
SQLite3::SQLException in ServiceConfig with minimum set of valid parameters
should return nil for the service path''
SQL logic error or missing database
C:/development/sandbox/prototypes/user_admin_client/config/../vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/rails_example.rb:17:in
2007 Jul 22
18
db:fixtures:load order
I was trying to deal with foreign key issues related to order of
fixture loading when I came across this:
http://techpolesen.blogspot.com/2007/04/rails-fixture-tips.html
This got me looking deeper into rails and I noticed that
db:fixtures:load calls Fixtures.create_fixtures once for each fixture
file. However, Fixtures.create_fixtures is capable of taking multiple
files and also handle the
2005 Dec 30
1
Need serious help - unit testing without a database
I''ve created a model, let''s just call it Person
class Person
attr_accessor :first_name, :lastname
def full_name
@first_name + " " + @last_name
end
end
I''m using this in my Rails application. My Rails application does not
use a database of any kind, and this model is obviously not a subclass
of ActiveRecord::Base. I can''t unit test this
2006 Oct 17
3
Should fixtures be transactional?
I started using the new Model.should_have(1).records expectation in
rspec_on_rails, and quickly realized that my fixtures were remaining
loaded, even in contexts that didn''t use them. Bug or feature?
Jay Levitt
2007 Nov 29
4
Rollbacks, Sqlite3 bug. Has this been reintroduced ?
Hey,
I just updated from the edge and it looks like this _issue_ has resurfaced.
Yesterday things were working (stories and specs).
No code base changes, only rspec and rspec_on_rails
After updating today I now need to set <config.txn...fixtures> to false in
the spec_helper.rb
to get the specs running, the stories are fine. Looks like the fixture
loading is trying to start a txn.
I
2006 Feb 08
8
Strategies for Unit testing 2 databases
Hi,
My application spans 2 (or more) databases for some very specific
reasons... My models are working fine, even dynamically establishing
connections as needed at runtime, and spanning relationships across the
databases (which really impressed me). The problem is, I can''t seem to
force Units for these models (that use a secondary db) to load their
fixtures into and use the
2005 Dec 22
13
in-memory SQLite for testing
I am following the rails book, and arrived to the section about
testing. The test database is configured as:
test:
adapter: sqlite3
database: ":memory:"
and I get this error with the simple product test:
% ruby test/unit/product_test.rb
Loaded suite test/unit/product_test
Started
E/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/
errors.rb:94:in
2006 Jul 18
7
backgroundrb and autotest
Hi,
First, thanks for the plugin. Sorry if this is not strictly a
backgroundrb issue but I thought others on this list might have come
across this problem.
I''m trying to run the test that comes via the worker generator. The
test works fine when running ''rake test_functional'', but when the
tests are run by autotest I get "uninitialized constant BackgrounDRb"
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
2005 May 03
8
SQLite3 + RAM drive => 3 times faster unit tests
One problem I sort of always had with the ActiveRecord''s tight coupling
to the SQL backend is how slow it makes the unit tests. OK, there are
some ways to make it faster at a price of extra complexity (reusing the
fixtures, doing a rollback in the end of the test, etc), but still - it
is much slower than what I would like a unit test to be.
Today I had a very simple idea (why, oh why
2006 Mar 23
7
Fixtures just Do Not Work for Me
Hello,
I have been struggling to get fixtures to work here with no success.
They just Do Not Work For Me (tm).
I have created a model named Headline with the `generate'' script and
modified the test/fixtumes/headlines.yml as follows
----------
gita:
id: 1
author: raulseixas
title: gita
happened_at: 2005-01-01 00:00:00
description: gita
This is the CD reissue of
2006 Aug 19
1
Testing and Fixtures
Hi,
I''m using Test::Unit::TastCase and am having some problems getting
expected database state before the test methods.
My Ruby on rails book quite clearly says that the following things
happen before every test method is run:
- all records in the database are deleted
- all the data in the fixtures are loaded into the database
- the setup method is run.
In the following
2006 Jun 15
6
Sqlite3 test fails in Rails app
Greetings:
I am using Sqlite3 database with my Rails app. When I try and run "rake
tests" for the app it always fails with the error:
** Invoke default (first_time)
** Invoke test (first_time)
** Execute test
** Invoke test:units (first_time)
** Invoke db:test:prepare (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:test:prepare
** Invoke
2011 Apr 11
3
Trying to run WBFS Manager using Wine... help
I am using wine-1.2.3
I have loaded wine, mono, winetricks and the program (WBFS Manager)
All installed and uploaded fine.
The problem is when I try to run the program (wine WBFSManager.exe) is says:
fixme:actctx:parse_manifest_buffer root element is L"asmv1:assembly", not <assembly>
fixme:sync:CreateMemoryResourceNotification (0) stub
err:ole:CoGetContextToken apartment not
2011 Jul 07
5
Instaling Sage Retail 2011 not sucessfull
Hi,
I'm new at Wine and Ubuntu, so please have some patience with me. I've tried to install Sage Retail 2011 with wine but the installation fails. The Terminal shows this:
Code:
bruno at bruno-Aspire-1680:~/Transfer?ncias$ wine /home/bruno/Transfer?ncias/SetupSageRetail2011.exe
fixme:advapi:DecryptFileA "C:\\windows\\temp\\IXP000.TMP\\" 00000000
fixme:advapi:LsaOpenPolicy
2006 Jun 15
4
testing with transactions
Hello!
I experienced problems with testing transactions which are supposed to be
rolled back, but are not, because of transactional fixtures eliminating the
inner transaction. Can this be worked around somehow without turning off
transactional fixtures? Maybe savepoints can help this?
Does anyone have any experience with savepoints to achieve nested transaction
functionality? Both Postgres