|
1 | | -== Creating the test database |
| 1 | + |
| 2 | += Creating the test databases |
2 | 3 |
|
3 | 4 | The default names for the test databases are "activerecord_unittest" and |
4 | 5 | "activerecord_unittest2". If you want to use another database name then be sure |
5 | | -to update the connection adapter setups you want to test with in |
6 | | -test/connections/<your database>/connection.rb. |
7 | | - |
8 | | -The connection files make certain assumptions. For instance, the ODBC connection |
9 | | -assumes you have a DSN setup that matches the name of the default database names. |
10 | | - |
11 | | - |
12 | | -== Requirements |
13 | | - |
14 | | - * gem install shoulda |
15 | | - * gem install mocha |
16 | | - |
17 | | -The tests of this adapter depend on the existence of rails checkout. Make sure |
18 | | -to checkout remotes/origin/2-3-stable, then make sure to export RAILS_SOURCE to |
19 | | -the full path of that repo. |
20 | | - |
21 | | -Define a user named 'rails' in SQL Server with all privileges granted for the |
22 | | -test databases. Use an empty password for said user. |
| 6 | +to update the connection file that matches your connection method in |
| 7 | +test/connections/native_sqlserver_<connection_method>/connection.rb. Define a |
| 8 | +user named 'rails' in SQL Server with all privileges granted for the test |
| 9 | +databases. Use an empty password for said user. |
| 10 | + |
| 11 | +The connection files make certain assumptions. For instance, the ODBC |
| 12 | +connection assumes you have a DSN setup that matches the name of the default |
| 13 | +database names. Remember too you have to set an environment variable for the |
| 14 | +DSN of the adapter, see the ODBC connection information for details. |
| 15 | + |
| 16 | + |
| 17 | += Cloning The Repos |
| 18 | + |
| 19 | +Clone adapter git://github.com/rails-sqlserver/2000-2005-adapter.git. The master |
| 20 | +branch is the one under development for rails 3, track the repos 2-3-stable |
| 21 | +branch for 2.x development. |
| 22 | + |
| 23 | +The tests of this adapter depend on the existence of the rails source which can |
| 24 | +be cloned at git://github.com/rails/rails.git. Like the adapter, the master is |
| 25 | +for 3.x development and it has its own 2-x-stable branches which can be tracked |
| 26 | +or checked out for local testing. |
| 27 | + |
| 28 | +Set the RAILS_SOURCE environment variable with the full path of the rails repo. |
| 29 | +It is optional, but you can set an AREL environment variable to the path of your |
| 30 | +clone of the official git fork of arel found at git://github.com/rails/arel.git. |
| 31 | +As of now there is no need to do this as our Gemfile will source this and we currently |
| 32 | +host our own compiler in this project. |
| 33 | + |
| 34 | +Now with all that out of the way you can run "bundle install" to hook everything up. |
| 35 | +Our tests use bundler to setup the load paths correctly. If all goes well, you should |
| 36 | +be able to run "rake test" which will load all the adapter tests followed by the |
| 37 | +core ActiveRecord tests. Lastly, it is typically good practice to do your work |
| 38 | +on a local branch of our remote tracking branch. |
23 | 39 |
|
0 commit comments