similar to: test a rake with fixtures

Displaying 20 results from an estimated 80000 matches similar to: "test a rake with fixtures"

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
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
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
2010 Jun 03
2
creating fixtures for has_many :through
I''m stymied at how to create a fixture that establishes a has_many :through relationship. I''ve watched the railscast at: http://media.railscasts.com/videos/081_fixtures_in_rails_2.mov ... but that''s for HABTM relationships. I''ve read: http://www.ruby-forum.com/topic/145676 but that ultimately doesn''t answer any question. So with no further ado:
2006 Jul 18
1
Fixtures Max Size? SystemStackError: stack level too deep
Hello, I have a table of zipcodes that I am using in my application, so there are approximately 50,000 rows in this table. I have dumped the table to a fixture yaml file to represent this data, but when I try to load it, I get this error: SystemStackError: stack level too deep Is there a max size allowed for a fixture file..? Here is the --trace output: rake db:fixtures:load --trace **
2010 Dec 12
5
Fixtures and unit tests - no such file to load
Hello all, I''m having some issues with my test fixtures and unit tests and am hoping somebody has an idea about how to fix it. Background: I have a table in my legacy database called tp_approval_step. For this table I have a fixture called tp_approval_step.yml I have a model called ApprovalProcessStep that uses set_table_name ''tp_approval_step'' In my test file,
2006 Jul 26
1
fixtures not loading when running rake test - ok other times
Hallo -- I have the most bizzare problem. I have a test called PropertyTest that runs absolutely fine. Even if I totally clear the test database before running it, it happily scoots off, loads all necessary fixtures, runs & passes all tests. My problem arises when I run rake test:units. Then, all other tests pass fine, but this one starts failing as if the fixture data simply
2011 Dec 25
1
Fixtures vs Fixture class, what is the intended purpose?
Hello, i am trying to fix the code for fixtures in rails because it is buggy and internal variable names are confusing, could somebody please explain to me what is the intended purpose of Fixture and Fixtures classes respectively? For example, why do we need both `Fixtures.initialize`and `Fixture.initialize`? They both "initialize" a single fixture, and in fact `Fixture.initialize`
2005 May 15
0
fixtures, unit tests, and rake
What are the semantics of the fixtures idea? I have a set of unit tests that when I run individually run fine. When I run them under "rake", the second unit test to call the same fixture doesn''t seem to actually load the data. That is, I have 2 tests; test1.rb and test2.rb, and each one calls "fixtures :foo". test1 runs, by itself, then test2 fails because it
2009 Dec 22
1
Rails fixtures - defining a table name?
Hi, At the minute all my fixtures have the same name as the table that they are intended for, because of a recent issue with rails it doesn''t seem possible to have a fixture beginning with the word ''test'' Does anyone know of a way to have a different fixture name and then map it to the correct table? Thanks -- Posted via http://www.ruby-forum.com/. -- You received
2006 Jun 10
5
[REL] Manage Fixtures 2.0.0
Just released a new version of the _Managed Fixtures_ plugin, previously known as _Export Fixtures_. The name change comes with some added functionality for managing the fixtures, primarily with two new import tasks for importing specific Models or all of them within the test/fixtures directory. Both new import tasks take the exported fixtures, and allow you to directly import one, or all of
2006 Mar 30
3
Export Fixtures Plugin
= Description This plugin is a super lightweight tool used to export data into the test/fixtures directory. So if you want to export all your data from your production server into your development environment, this will simplify the process without having to load up your database manager. [%] rake db:fixtures:export_all RAILS_ENV=development [%] rake db:fixtures:load = INSTALLATION
2013 Mar 14
3
Error: did not find expected key while parsing a block mapping
I run test: test:units lass ProductTest < ActiveSupport::TestCase test "product attributes not be empty" do product = Product.new assert product.invalid? assert product.errors[:title].any? assert product.errors[:description].any? assert product.errors[:price].any? assert product.errors[:image_url].any? end test "price musst be
2004 Dec 09
3
fixture problem, TypeError: nil is not a symbol
When I run rake against Rails 8.5 to test unaltered model tests with yaml fixtures I get the error and stack trace reproduced below for every one of my model objects. Has anyone seen something this before? Any idea what could be going on here? The following ruby-talk thread may or may not be relevant: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/95301. Thanks much,
2006 Apr 17
2
binary info in test fixtures?
Hi all, I have a shopping application I am testing, and one of the models is an Order model, within which a credit card number is encrypted and stored in the db (mysql) as a BLOB field. When trying to run my unit tests, I cannot get my model fixtures to load the encrypted data. If, in my dynamic fixture (YAML) file, I could have access to my app''s models, the problem would be trivial..
2007 Sep 05
2
after_create callback called twice in test env when using fixtures
All, I''ve been trying to figure out a strange bug in one of my applications that I think I''ve narrowed down to a problem with rails fixtures. It seems as though the after_create callback is being run twice when I save a record. This is only happening a) in the test environment, and b) when there is a fixture file for that table. The test below only prints "Doing
2010 Oct 06
3
Script acting differently inside of rake task
I''ve created a rake task that does various things, one of which is calling a script. When I call that script from my Rails.root folder, it works, but it doesn''t work inside my rake task. [This is rails 3] That is, the following line works from bash: lib/daemons/mailer_ctl start However, inside my rake task, this line does not work: puts `lib/daemons/mailer_ctl start` The
2005 Dec 12
2
Using a lib in YAML fixtures
I''m using the runt library [1] to do some temporal expression matching. I want to keep the expression in a binary field in my db. I figured that then in order to do the fixtures, I''d need to do some erb in the yaml file. So I came up with this: onetime: id: 1 name: One Time description: This event occurs only one time. timex: <%= REYear.new(7) & REMonth.new(24)
2011 Jun 28
1
error from command rake test:units
I got some error when i run the command line rake test:units 14) Error: test_the_truth(UserTest): ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: cultures: DELETE FROM "cultures" WHERE 1=1 I did delete the model culture from my project.. and i change it it as other name. could anyone help to to solve this problem. thanks -- You received this message because
2010 Jul 28
5
db:fixures:load does not call Model.save()
Hello, $ ruby script/generate model balance plus:integer minus:integer equal:integer $ cat app/models/balance.rb class Balance < ActiveRecord::Base def save self.equal = self.plus - self.minus super end end $ cat test/fixtures/balances.yml _10-1: plus: 10 minus: 1 $ rake db:fixtures:load $ sqlite3 db/development.sqlite3 sqlite> select * from balances; //=>