search for: load_fixtures

Displaying 20 results from an estimated 31 matches for "load_fixtures".

2006 Jan 20
6
Pre-populate db with yaml outside of testing?
Hi. What is the best way to pre-populate your database with records while developing, not testing? For example, I want to: 1) > [run this command to populate db] 2) > ruby script/server 3) now I can surf to localhost:3000 and my app will already have relevant data I''m hoping to use yaml to suck it in. Is there a way to use the Fixture class to handle this even though this is
2005 Nov 26
4
activerecord rake test_mysql
...transaction'' ./test/../lib/active_record/fixtures.rb:251:in `create_fixtures'' ./test/../lib/active_record/fixtures.rb:244:in `silence'' ./test/../lib/active_record/fixtures.rb:244:in `create_fixtures'' ./test/../lib/active_record/fixtures.rb:539:in `load_fixtures'' ./test/../lib/active_record/fixtures.rb:487:in `setup_with_fixtures'' ./test/../lib/active_record/fixtures.rb:521:in `setup'' ./test/../lib/active_record/fixtures.rb:520:in `setup'' 2) Error: test_adding_with_proc_callbacks(AssociationCallbacksTest):...
2008 Jan 16
0
[CruiseControl] RubyOnRails build 8649 failed
...tial_integrity'' ./test/../lib/active_record/fixtures.rb:508:in `create_fixtures'' ./test/../lib/active_record/base.rb:1207:in `silence'' ./test/../lib/active_record/fixtures.rb:507:in `create_fixtures'' ./test/../lib/active_record/fixtures.rb:950:in `load_fixtures'' ./test/../lib/active_record/fixtures.rb:925:in `setup_fixtures'' ./test/../lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:120:in `send!'' ./test/../lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:120:in `run_ca...
2006 Nov 24
7
Anyone know whats going on with PostgreSQL async_exec errors?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Anyone know what''s going on with ActiveRecord Edge and 1.2RC1 unit tests. I get 13 failures from the "async_exec" method call. ie: test_callback_rollback_in_save(ConcurrentTransactionTest): ActiveRecord::StatementInvalid: NoMethodError: undefined method `async_exec'' for #<PGconn:0xb75a8754>: SET
2006 Jan 27
5
Before I write this myself, is there already an easier way?
Recently I''ve wanted to be able to take the data I''ve painstakingly defined in my fixture files and slurp it up into my development database so I can play with my website (locally, in development mode) with the same data I use in my tests. In a similar vein, I want to take the table definitions in the development_structure.sql file and use it to re-define my development
2005 Nov 10
6
Manually loading fixture data
Hi all, I''ve got some tables with fixed amounts of data in them (a "states" table, for example). For tables like this I can easily put *all* of the data in the fixture. For general futzing purposes, and for those times I want to reload a database from scratch outside of testing (for whatever reason), what''s the best approach? I thought perhaps ActiveRecord::Base had
2006 Mar 31
1
rails + svn automation script
.../database.yml 7. Moves config/database.yml to config/database.yml.sample 8. Adds a script/reload_everything.sh.sample script to scripts/ that 8a. Drops the dev and test database 8b. Reloads the dev and test database 8c. Performs migration on the dev and test database 8d. Runs rake load_fixtures (to populate the dev database) 8e. Runs rake to run the tests 9. Ignores script/reload_everything.sh I think that''s it. Just wondering if anyone''s done something like that before I make my own. That''s generally the process I follow when creating a new Rails projec...
2006 Feb 16
2
fixtures outside of rails
Is there an easy way to use fixtures outside of a rails app? I''m using activerecord for a project and would love to use fixtures as well, but I haven''t found any info on doing this. I''m hoping it''s something quick and simple someone can explain to me so I don''t have to dig through the rails source :) -- Posted via http://www.ruby-forum.com/.
2006 Nov 25
2
RSpec 0.7.3
Hi all, I just released RSpec 0.7.3. It''s got a few bug fixes and the rails plugin *should* run against both Rails 1.1.6 and 1.2.0-RC1. If you run into problems, please report bugs and feature requests in the tracker at rubyforge: http://rubyforge.org/tracker/?group_id=797 Cheers, David
2007 Sep 21
1
Do fixture_scenarios and RSpec peacibly coexist?
...`read_fixture_files'' ..lib/fixture_scenarios.rb:66:in `initialize'' ..lib/fixture_scenarios.rb:29:in `create_fixtures'' ..lib/fixture_scenarios.rb:28:in `create_fixtures'' ..lib/fixture_scenarios.rb:26:in `create_fixtures'' ..lib/fixture_scenarios.rb:257:in `load_fixtures'' plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/model.rb:12:in `before_eval'' The project is heavily scenario-dependent, so if it comes to a choice we know which one we will save and which we will lose... Has anyone encountered this? Can''t fixture_scenarios and RS...
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 I'...
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
2011 Jul 25
4
Rails 3 test database issues
...upport-3.0.3/lib/ active_support/b enchmarkable.rb:55:in `silence'' C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/ active_record/fix tures.rb:514:in `create_fixtures'' C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/ active_record/fix tures.rb:973:in `load_fixtures'' C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/ active_record/fix tures.rb:938:in `setup_fixtures'' C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/ active_support/c allbacks.rb:414:in `_run_setup_callbacks'' C:/Ruby192/lib/ruby/gems/1.9...
2007 Feb 13
16
Error against latest trunk while testing via spec for model
Hi I just did an update to lates trunk ================= context "Given a generated venue_spec.rb with fixtures loaded" do fixtures :venues specify "fixtures should load two Venues" do Venue.should have(2).records end end ================== gives me ========== 1) TypeError in ''Given a generated venue_spec.rb with fixtures loaded fixtures should load two
2006 Jul 02
1
seeding a database
Hi, I have set up my Rails app to use Migrations. At the end of the migrations the database is empty. I would like to do something, a single step, after the migrations to seed the data so I can click around my site and see some actual content. What is the best way to do this? Thanks, Peter
2007 Sep 27
0
fixture_scenarios in trunk
...b:37:in `create_fixtures'' ../vendor/plugins/fixture_scenarios/lib/fixture_scenarios.rb:33:in `create_fixtures'' ../vendor/plugins/fixture_scenarios/lib/fixture_scenarios.rb:26:in `create_fixtures'' ../vendor/plugins/fixture_scenarios/lib/fixture_scenarios.rb:257:in `load_fixtures'' ../vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/ rails_example.rb:27:in `before_eval'' At the moment I am only using global fixtures for one model, I have tried removing this line and its still the same error. config.global_fixtures = :sites and I have added th...
2006 Jun 24
5
Rake vs Ruby for running tests (error discrepency)
...8/gems/activerecord-1.14.2/lib/active_record/base.rb:794:in `silence'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:248:in `create_fixtures'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:565:in `load_fixtures'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:512:in `setup_with_fixtures'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:547:in `setup'' However if I use "ruby test/unit/player_se...
2006 Apr 13
1
Setting up Testing model, getting an error
...8/gems/activerecord-1.14.2/lib/active_record/base.rb:794:in `silence'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:248:in `create_fixtures'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:565:in `load_fixtures'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:512:in `setup_with_fixtures'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:547:in `setup'' 2) Error: test_create(ProductTest): NoMethodEr...
2005 Dec 12
2
Using a lib in YAML fixtures
...uby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/fixtures.rb:244:in `silence'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/fixtures.rb:244:in `create_fixtures'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/fixtures.rb:540:in `load_fixtures'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/fixtures.rb:487:in `setup'' I''ve put require ''runt'' in environtment.rb, the unit test file, and even in my yaml file doing <% require ''runt'' %>. Not really s...
2007 Jul 12
0
[retry] fixture_references: "Mysql::Error #HY000"? (fwd)
...rd/fixtures.r b:248:in `create_fixtures_without_references'' /home/hgs/aeg_intranet/csestore/config/../vendor/plugins/fixture_references/ lib/fixture_references.rb:92:in `create_fixtures'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/fixtures.r b:593:in `load_fixtures'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/fixtures.r b:538:in `setup'' But AFAICS the fixture data looks OK # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html <% fixtures :devices, :descriptions %> olympus400_in: id: 1...