similar to: [ANN/RFC] Rathole, a fixtures extension plugin

Displaying 20 results from an estimated 4000 matches similar to: "[ANN/RFC] Rathole, a fixtures extension plugin"

2006 Jul 10
8
Setup new data in the test database _after_ unit test runs
All, I want to run automated unit tests as part of my build. I am building to my test environment. Upon successful completion of all of my unit tests, I would then like to load some data (using a fixture, I imagine) into my test database that will act as fresh "system test" data for my users to play with. What is the best way to "load the standard system test/user acceptance
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 01
10
Fixtures Cleanup
All, I''ve been playing a bit with some patches to make the fixture loading and management code a little bit easier to maintain. If I were to start chopping out features, how would you feel about losing: Fixture instantiation, Old school single-file fixtures, CSV fixtures, The ability to specify a subset of fixtures (everything''s always loaded instead), The ability to
2008 Feb 11
6
Should I Test My Fixtures?
I have a number of fixtures in my test suite. For example, with acts_as_authenticated and acts_as_state_machine, I created a number of users in different account states for use in functional testing. (Suspended users can not log in, etc) Is it a good idea to run fixtures through tests to ensure that they conform to their ideals? EG: assert users(:suspended_user).suspended? If so, where should
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 Nov 10
2
Testing with foreign keys
I''m looking for a plugin/whatever for preloading fixtures, to run tests with FKs defined. Specifying load order just doesn''t work for me, I need to purge the test db, load all fixtures, and only then create the FK constraints. Any suggestions? Isak --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups
2006 Jul 29
6
Complex tests - use a DSL instead of fixtures
I''ve been finding I use fixtures less and less lately. I am working with rather complex testing of code that does data analysis. Each test may involve 5-10 tables and some of the data is different in nearly every test. I''ve found it much more readable to build a mini-DSL for the setting up the database rather than using a huge amount of fixtures. It has the added benefit of
2005 Jun 27
9
FK constraints overrated?
Hello folks, I use to think that a relational databases without foreign keys constraints enforced strictly by the RDBMS were no good, piece of crap, data junk. However, I''ve also learned the hard way that FKs constraints imposes serious difficulties when moving data around, specially between different DBs, or for loading test data or for upgrading DBs schemas, or for porting DBs
2010 Feb 03
5
How to export the examples in help(something) to a file?
Some examples in the help page are too long to be copied from screen. Could somebody let me know some easy way on how to extract the example to a file so that I can play with them?
2008 Sep 16
8
rspec, Rails 2.1.0, rubygems, Mac OS X Leopard - rubygems does not recognize latest version
I''m trying to run some specs on my Mac OS/Leopard machine (10.5.5) but rubygems won''t allow it: $ spec spec/models/my_spec.rb Rails requires RubyGems >= 0.9.4 (you have 0.9.3). Please `gem update --system` and try again. ...but I already have the latest & greatest installed: $ gem search --local rubygem *** LOCAL GEMS *** rubygems-update (1.2.0, 0.9.5) Tue Sep 16
2006 May 09
2
load fixtures
I''m finally getting beyond using basic test fixtures, and a few questions have popped up. Has anyone found ways to do these? 1. Use a test fixture that is named differently from its table name? We''d like to have more than one possible fixture per table. (Or perhaps use test fixtures named similarly but in different directories.) 2. Load a test fixture for one test method only
2004 May 18
1
having hell of the time converting away from UW
I just want to check and make sure not missing anything. I'm trying to convert a customer away from UW. unfortunately, all of the mailboxes are in MBX format (my own mistake coming back to haunt me). mailutil doesn't seem to do conversions properly. It keeps complaining about an existing copy of /mbox and only if I say to -merge append will the copy proceed. mailsync doesn't
2006 Mar 28
2
Testing STI models
Hi everyone! I have a question: what is the preferred way (in terms of simplicity) to test models with single table inheritance. Right now I have 1 test case and 1 fixture for all of the STI models, but it''s very hard to maintain it (too many tests and records in fixture). It would be better if fixtures could be named separately from DB tables. I know, Engines plugin has
2007 May 21
2
Rails'' fixtures suck! But what about something like this?
Sorry about the very long email, but this is a hairy topic that''s been annoying me for some time and I decided to try to do something about. Also, if you got this twice, I apologize too, but it didn''t seem to have successfully gone out the first time. Background: ---------- I''ve been dealing with Rails for about a year and a half now. I''ve been using
2007 Sep 07
4
fixtures in before(:all)
I was planning on using a fixture within a description that didn''t modify the fixture, so I put it in a before(:all) block: describe "Customer", "xml" do fixtures :customers before(:all) do one = customers(:one) end # ... As a result, I got this message: 1) NoMethodError in ''Customer xml before(:all)'' You have a nil object when you
2009 Mar 28
10
Use fixtures within fixtures?
Heya, I''m using globalize2 and have following problem with my fixtures: categories.yml: one: parent_id: two color: #ff00aa two: color: #00ff11 three: parent_id: two color: #ab00ab category_translations.yml one-en: id: one locale: en name: Cars one-es: id: one locale: es name: Coches two-en: id: two locale: en name: Start two-es: id: two locale: es
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 Jul 24
1
Testing w/out DB connection
I have several plain ruby classes that do nothing but implement algorithms. What is the prefferred way to run these w/out making a DB connection every time? Thanks, Dennis Byrne -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060724/5ff610dd/attachment.html
2006 Jul 14
5
migration and inserting default data
Hi, I''m wondering is there a way to load default data in the migration script? So, for example I''m creating new table to store the order status, I also want to pre-populate the table with some data from a sql file. I have done a quick search on the list but cannot find anything. thanks, - reynard -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Feb 22
15
Fixtures and Relationships
In my daily development, I migrate back and forth between versions, and often do: rake load_fixtures... ... in order to populate my development database with fun data. Now, with any HABTM relationship, there are failures, as there is no way to say "which" fixtures to load first. Within an actual functional or unit test case, you could simply load them in the proper order, but