similar to: functional tests run fine on their own but fail with rake

Displaying 20 results from an estimated 6000 matches similar to: "functional tests run fine on their own but fail with rake"

2006 Apr 07
3
*dont* empty the database...?
I''d like to test against a very large dataset - is there anyway to prevent the data in the test database being destroyed on each test run? storing the dataset in fixtures causes the tests to take several minutes to complete, even using csv fixtures, and that''s just for one test case! I''d appreciate any suggestions on how to preserve the data in the test database
2006 Jun 24
5
Rake vs Ruby for running tests (error discrepency)
I''m having (to me) a strange problem with errors when running my tests with rake as opposed to using ruby. If I do rake test:units I get this error for several tests, but not all: 13) Error: test_player_has_game_statistics_for_season(PlayerSeasonTest): ActiveRecord::StatementInvalid: Mysql::Error: Duplicate entry ''22'' for key 1: INSERT INTO positions (`name`, `id`,
2006 Feb 06
9
tests fine, but fail under rake
Hi there, So I have an odd error at the moment that only occurs when I run tests via rake. It''s happening with two tests now. Under a simple ruby run, the tests are fine, e.g.: D:\User\Code\ruby\prometheus>ruby test\functional\story_comments_controller_test .rb Loaded suite test/functional/story_comments_controller_test Started ......... Finished in 2.37 seconds. 9 tests, 65
2006 Jul 13
1
fixtures getting a little hard to manage
I have lots of tests which rely on fixtures being a particular state in order to pass. For example, one test checks that a User object can have no more than 3 associated ''Page'' objects at a time. That''s a simple example but I have more complicated tests too. The problem is I sometimes add a fixture without realising it''ll affect the tests and everything
2009 Apr 06
9
setup method in functional tests and instance variables
I have the following in my functional test file. class UserControllerTest < ActionController::TestCase fixtures :users def setup @controller = UserController.new @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new @invalid_user = user(:invalid_user) @valid_user = users(:valid_user) end def test_login_success
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 Apr 17
3
using rake db:fixtures:load with rspec fixtures
Hi, I''m new to rspec. I have some fixtures in /spec/fixtures. If they were in /test/fixtures they could be loaded with rake db:fixtures:load. Is there any way other than a symlink to load my rspec fixtures into the database with rake? Or, can I cause rspec to load the fixtures from /test/fixtures? Thanks, Paul
2006 Oct 17
3
rake -T is missing rake db:fixtures:dump?
Subject says it all: rake doesn''t know about db:fixtures:dump. When I try, I get this: Don''t know how to build task ''db:fixtures:dump'' I thought this was a standard feature that ships with rake- any idea why it''s missing, and how I can reinstall it? Here''s the environment: Ruby version 1.8.4 (powerpc-darwin8.6.0) RubyGems
2011 Apr 26
1
problem populating table using rake db:fixtures:load
I''m running Rails 3 and I''m trying to populate a table using rake db:fixtures:load, and I''m getting a "Could not find" file error. The table is called stores, and I''ve confirmed that it exists, and the data is in stores.yml in my test/fixtures directory. The command I''m running is rake db:fixtures:load FIXTURES=stores. The error message
2007 Mar 15
5
rake spec:views no transaction error
Hello, I have recently upgraded to the 0.8.2 release of rSpec, and I am receiving the following message with each view spec execution: WARNING: there is no transaction in progress I have upgraded the rspec_on_rails plugin as well, and both the model and controller tests are working flawlessly. Is there some simple step I missed? thanks for the input. -Chris -------------- next part
2007 Aug 27
7
Foreign key constraints, fixtures, and rake task
I''ve got a spec that loads a fixture in the "before" block. This works fine running scripts/spec, but when I run rake spec instead, I get: ActiveRecord::StatementInvalid in ''User in fixture :quentin with an IM service but no IM name should be invalid'' Mysql::Error: Cannot delete or update a parent row: a foreign key constraint fails
2006 Mar 01
1
maddening intermittent failures in unit tests with "working" code
Hi all, This testing problem has been a sink for time today, and is still unresolved. Basically I have some unit tests that test simple functions (example below) that depend on join operations in a habtm relationship, and I suspect I am getting "false" failures, i.e ones that do not logically make any sense. I need fresh sets of eyes to take a look and see if I''m mising
2006 Jan 02
3
rake test_units not loading any fixtures
Hello All, If I run my unit tests individually using Ruby, they all work correctly. However, if I try to run them using "rake test_units", I get a bunch of error messages. The error messages appear to be caused by rake not loading any of the fixtures into the test database. I am using PostgreSQL on Windows. Does anyone have any suggestions? Many thanks, Bruce. -- Posted via
2005 Nov 26
4
activerecord rake test_mysql
Hi (I''m resubmitting this because First question: This is the rails dev list, correct? I''d like to submit a patch and am following the steps on this page: http://dev.rubyonrails.org/ Here''s what I did (using mysql 5.0.15-nt): created 2 databases: activerecord_unittest activerecord_unittest2 created 1 user: rails (giving all priveleges to both databases) ran
2006 Jul 10
1
rake db:fixtures:load FIXTURES=xyz
I am attempting to do selective fixture loading against my test database. When I run rake db:fixtures:load FIXTURES=DataSetInfo I get no output. (A full trace is below). I''m trying to figure out why nothing happens. 1) Does the command above attempt to operate against my test database? 2) DataSetInfo is the name of my table and the name of my yml file I generated these YAML
2006 Aug 08
2
Testing Inconsistencies - ruby works rake fails
I''m getting some very weird results when testing my system. If I run my unit tests using => ruby \test\unit\<filename.rb> each of the tests pass. If I run => rake test_units I get several failures, and they all have to deal with the same issue. For instance I''m getting => ActiveRecord::StatementInvalid: RuntimeError: ERROR C42P01 Mrelation
2010 Mar 26
6
Rake argument error
Hi, I''m having a problem loading a sample data with simple rake command. rake db:fixtures:load When I run the above command,I get the following error $rake db:fixtures:load (in /home/raghu/www/photos) rake aborted! a YAML error occurred parsing /home/raghu/www/photos/test/fixtures/photos.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Please
2006 May 02
4
How to extend rails rake tasks?
Does anyone know how to extend the buit-in rake tasks like test:unit. I want to custom load some fixtures in a particular order. Thanks, Zack
2006 Mar 07
3
STI and unit testing
Hi all, I''m having a bit of a problem with unit testing. I''ve simplified my models to try and get my head round it but I''m still struggling. I''m using STI and trying to write tests for the extended models (code below). I''ve written test cases for the extended models which themselves extend the test case for the parent model, so BarTest extends
2007 Apr 14
5
SAMBA Problem - Users take ownership
Hi, I have a problem with my Samba/WinBIND implementation. In folders shared by multiple people the last one to access and modify a file takes ownership of the file and changes the permissions so other users cannot make changes to the same file: [root@atlas PLANNING RECORDS]# cd REGIONAL\ 1\ AIRLINE\ DOCS/ [root@atlas REGIONAL 1 AIRLINE DOCS]# ls -al total 1232 drwxrws---+ 8 root