Ruby on Rails Thursday, September 10, 2015

Hi,

you may use "rake db:schema:dump" to get the current schema out of your SQL Server DB.
If there are no migrations Rails will use the schema.rb file to setup your test database.
BUT: you can not use the Sql Server schema dump for a sqlite db, as it may contain
special Sql Server datatypes (varchar, char, real, money, ...)
Yoe have to search/replace this datatypes to simple datatypes (string, text, float )

hf Klaus

Am Donnerstag, 10. September 2015 17:28:03 UTC+2 schrieb Ruby-Forum.com User:
Hi,

I have used cucumber/RSpec before while using MySQL & SQlite but my new
project application is so gigantic & doesn't have any unit-tests with in
the app. So I want to write unit/functional and integration tests to it
but I dont have a schema for the data since its backed by MSSQL db.

1. How do I get a schema dump or test data from what I have?
2. I want to create a test sqlite3 db that mimicks production db so that
I can run my tests against it.

Any information would be of great help.

Thanks,
Uday

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c84cd4b5-14e0-4421-ad99-1729bfe1fa6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment