similar to: Migrations & Unit Testing: Possible Bug in Rails?

Displaying 20 results from an estimated 10000 matches similar to: "Migrations & Unit Testing: Possible Bug in Rails?"

2006 Jan 30
2
Rake and NOT using schema.rb for clone_structure_to_test
Is there a way to specify not not use schema.rb but instead using a native sql file to clone structure to the test db? Schema.rb doesn''t really work that well for mediumblobs ... Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Aug 05
5
error with db:migrate
I''m new to ROR, and am working my way through the Agile Web Development Book. In the test application, the authors tell me to test my database connection by performing "rake db:migrate". When I do, I get the error "Don''t know how to build task ''db:migrate''" I''ve been looking around at the files, and I see a reference to a
2006 Mar 02
2
Unit tests, salted hash login
Hello, I am having some trouble running the unit tests for the salted has login generator. I am a bit new to both ruby and rails so I am having a little trouble deciphering the error message I get when running ''rake test_units''. Up till the point where I try to run the unit tests I have followed the quick start guide for the salted hash login generator
2006 Jun 02
3
Wierdness with rake test_units and schema.rb
I have just migrated to use Rail 1.1 from 1.0. In the progress of fixing and cleaning up the unit tests. I found the following problem. I am not sure if this is a bug or it is my environment. When I run "rake test_units, some of the index in association tables is not created, this leads to failures for some unit test cases. Thinking that may be because I didn''t setup the
2006 Apr 02
5
PostgreSQL and unit tests
After upgrading to 1.1, I can''t run any unit tests. Apparently when I run rake test_units, it uses a migration to set up the database. Unfortunately when it runs the migration, it''s adding not null constraints to every field, even though I haven''t got that set up. I''m using the ruby-postgres (0.7.1.2005.12.21) adapter with PostgreSQL 8.1.0. I''m
2008 Jun 05
23
unit test question
In development and production, I''ve got postgresql constraints that prevent deleting a CaseManager if there is a Client that belongs to that CaseManager. In unit tests...and obviously in my testing db, those restrictions don''t get added. Is it wrong to test for deleting dependent records in unit tests? Craig --~--~---------~--~----~------------~-------~--~----~ You received
2006 Apr 12
2
unit testing with model inheritence
Having jotted down some models, with some inheritence I tried to run some unit tests. After waiting for rake test_units to run I got a rake of errors (if you''ll forgive the play on words). The errors were to do with unknown tables in the tear down stage. The unknown tables corresponded to sub-types where single table inheritence was used. In other words, these tables *shouldn''t*
2006 Mar 10
2
rake fails on build server, but not in development
I''m working in a development environment of Mac OS X with MySQL, and a production deployment environment of Redhat with Oracle XE. In the course of setting up a new continuous build server that more closely mimics our production environment, I got stuck on the following strangeness on the build server (Linux, Oracle). 1. rake fails 2. rake test_units works 3. rake test_functional
2005 Oct 20
5
Unit Test Error: `load_specification': undefined method `parse' for Time:Class
All, I''ve come across a confusing problem when attempting to run unit tests for an application on OSX (works on Windows). I''m receiving the following error: `load_specification'': undefined method `parse'' for Time:Class (NoMethodError) This is also confusing because I can''t figure out how the error appeared. When I revert back to previous revisions,
2006 Feb 28
10
Salted hash login, postgresql, unit tests
Hello, I have tried to install the salted hash login generator by following the quick start guide at: http://wiki.rubyonrails.com/rails/pages/SaltedLoginGeneratorQuickstart. Everything seems to work fine until I try to run the unit tests by doing ''rake test_units'', then I get the following error message: <error-message> [brasse@keso login-test]$ rake test_units (in
2005 Dec 30
1
Need serious help - unit testing without a database
I''ve created a model, let''s just call it Person class Person attr_accessor :first_name, :lastname def full_name @first_name + " " + @last_name end end I''m using this in my Rails application. My Rails application does not use a database of any kind, and this model is obviously not a subclass of ActiveRecord::Base. I can''t unit test this
2006 Jun 10
2
readline problems
I get the following error: rake test_units --trace ** Invoke test_units (first_time) ** Invoke test:units (first_time) ** Invoke db:test:prepare (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:test:prepare ** Invoke db:test:clone (first_time) ** Invoke db:schema:dump (first_time) ** Invoke environment ** Execute db:schema:dump ** Execute db:test:clone **
2006 May 05
0
Perplexing unit test issue
Because we''re now using views, I had to upgrade to mysql 5 on a project using Rails 1.0. Updated my mysql gem accordingly (which required upgrading xcode). Ruby 1.8.2, MacOS X (10.4.6) Worked fine several times (even before updating the mysql gem, then suddenly it just balked and stopped working, giving the spew below. Have also dropped (and recreated) both the test and
2006 Feb 13
8
postgres and rake
am in a bit of a quandry... I have asked postgresql-users list and haven''t gotten anything to work with... > > How do I change the owner of a schema? > > > > ALTER SCHEMA "public" OWNER to "some_user"; #? > > http://www.postgresql.org/docs/current/interactive/sql-alterschema.html > > The docs explain this very situation. HTML
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
2013 Feb 18
13
Correct Use or Naming of Migrations
Hi Folks, There is much discussion where I work at present regarding migrations, and the ''correct'' usage or not of them. TL;DR Should migrations be used just to modify schema, and other ''deploy'' tasks done other ways? If yes, how to ensure no repeat runs of such tasks (seeds, jobs etc) Background Once you''re live there are often additional things
2005 Dec 22
2
help me understand migrations movie
I''m somewhat of a newbie - played with recent versions of rails a few mths ago, but have decided to start from scratch with 1.0. I want to build my new db as much as possible with migrations, so I watched DHH''s migrations movie from rubyonrails.org. A few things confuse me: 1. He generates the model ("post") before running rake db_schema_dump. Is that necessary or
2006 Feb 27
1
problem with rakefile
hi, I am having a problem with the rake test_units in my RoR application. when i''m running it it tries to run all the files that end in *.rb (i think) under the /unit folder in the project and it''s subfolders. The problem is that my source control system (bitkeeper) saves an subfolder named SCCS under each of the project folders, and in it, for eack .rb file another file
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
2006 Apr 02
1
not null constraints added when running rake - is this a "feature?"
After upgrading to Rails 1.1, a lot of my unit tests broke. Turns out when I run rake test_units and it migrates the test database, it adds a not null constraint to every column. I don''t have this specified in my migration, and apparently it works fine with rake migrate if I do ''rake migrate RAILS_ENV=test'', the not null constraints aren''t set. So why when I