similar to: test not rolling back

Displaying 20 results from an estimated 3000 matches similar to: "test not rolling back"

2007 Sep 02
4
unit test failing
I have unit tests set up with "self.use_transactional_fixtures = true", so each test should roll back. Run individually, all my tests succeed. But running "rake test:units", I get the below error in 5 test cases. I''m not sure how to solve this since I''m not sure how to debug tasks run thru rake. Any ideas are appreciated. 1) Error: test_delete(OrderTest):
2006 Jun 11
4
Model records are not saved to database in during tests
Hi, I''m trying to do unit tests which should save informations into a database that another computer should be able to get while the test is running. The problem is although my unit test class has "use_transactional_fixtures" set to false, when I create a new instance of a model and save it, it does not actually appear in the database when connecting to this same
2008 Nov 06
3
Verifying some understanding about manipulating DB data in before/after callbacks in RSpec
We had an after(:each) callback that looked like this: PurchaseOrder.find(:all).each {|po| DraftInvoice.find_all_by_po_number(po.po_number).each {|di| di.destroy}} which we were hoping would reset some purchase order data in a certain way. However, because we have "self.use_transactional_fixtures = true" set in test_helper.rb, this code was never getting committed. So, I just
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
2007 Aug 31
3
Setting use_transactional_fixtures=false for a single spec - a bad idea?
Hi! I would really like to find a way to allow me to write RSpec specifications for code that use database transactions. I know I can set config.use_transactional_fixtures = false in my spec_helper.rb. That works, and that''s great, but it will (I think) slow down my specs quite a bit. I would like to turn off transactional fixtures for just a single spec (describe), or even
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
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
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
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
2007 Oct 25
6
Rollbacks, Sqlite3 bug
Okay - so the sqlite bug reported a day or so ago on the list is real bug. I''m going to file something in the tracker for that... I also learned that before(:all)...after(:all) is not wrapped in a transaction, the way before(:each)...after(:each) is. Is there some reason behind this? Can you not wrap transactions inside transactions? Scott
2006 Apr 16
7
Problem running unit tests
I am running Rails 1.1.2 with Ruby 1.82-15. My database is Postgresql. I haven''t had any problems generating models, migrations, using scaffolds, and generally building and using my application, but I haven''t been able to get testing to work. I initially just ignored the problem and kept developing, but would like to add proper testing from here on out. Currently when I type
2011 Aug 10
1
How to stop Rspec loading my Cucumber fixtures
I have a bunch of fixtures designed to populate the database for my Cucumber integration tests. But at this stage I want my database to be empty when using Rspec. So, I moved the fixtures from `/spec/fixtures` to `features/support/fixtures`, and updated `features/support/env.rb` to read: Fixtures.reset_cache fixtures_folder = File.join(RAILS_ROOT, ''features'',
2006 Jun 28
2
undefined method `use_transactional_fixtures=''
Folks, I checked my test_helper.rb and it has self.use_transactional_fixtures = true My code was generated with 1.1.2 and I''m using 1.1.3 right now after but the error persists. I googled for this issue and it appears that a require is missing or something like that. I can''t figure it out, please help! /opt/local/bin/ruby -Ilib:test
2007 Apr 04
1
pontential bug in rspec_on_rails and ActiveRecord transactions
Hello rspec-users, I''ve encountered a strange bug in rspec, but it may be me who is wrong. I''m running latest version from the trunk (r1678) of both rspec and rspec_on_rails. Please consider the following model: class Url < ActiveRecord::Base def after_save Contact.create!(:primary_email => ''user at example.com'') raise
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
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
2008 Feb 12
4
Funny behavior with Fixtures... on Ubuntu..
Hey Guys, I''ve got a test class that loads a bunch of fixtures. My understanding is that fixtures are reloaded between each test... and I even have the following two method calls at the top of my test class to make doubly sure... class TaskTest < Test::Unit::TestCase self.use_transactional_fixtures = true self.use_instantiated_fixtures = false When I run my tests
2005 Dec 23
2
SQLite in-memory
I left ":memory:" in database.yml for testing and the most simple tests in the Agile book do not work (see trace below for test_truth). Since that''s what comes with the distributed database.yml I suppose it''s me doing something wrong. Did someone get SQLite ":memory:" working? How does it grab the schema? -- fxn % rake test_units (in
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
2007 Aug 17
4
Privileges
Hi all! I need a non-root user to be able to perform zfs snapshots and rollbacks. Does anybody know what privileges that should be specified in /etc/user_attr ? Best regards, Lars-Erik Bj?rk