Skip to content

Commit 2d357f5

Browse files
committed
Updating running tests instructions.
1 parent 5f3c522 commit 2d357f5

File tree

2 files changed

+47
-13
lines changed

2 files changed

+47
-13
lines changed

Gemfile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,18 @@
22
source :rubygems
33

44
gemspec :path => ENV['RAILS_SOURCE']
5-
gem 'arel', :path => ENV['AREL'] if ENV['AREL']
6-
gem 'tiny_tds', :path => ENV['TINYTDS_SOURCE'] if ENV['TINYTDS_SOURCE']
5+
gem 'arel', :path => ENV['AREL']
6+
7+
group :tinytds do
8+
if ENV['TINYTDS_SOURCE']
9+
gem 'tiny_tds', :path => ENV['TINYTDS_SOURCE']
10+
else
11+
gem 'tiny_tds'
12+
end
13+
end
714

815
group :odbc do
9-
gem 'ruby-odbc', '0.99992'
16+
gem 'ruby-odbc'
1017
end
1118

1219
group :development do

RUNNING_UNIT_TESTS

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,49 @@ Clone adapter git://github.com/rails-sqlserver/activerecord-sqlserver-adapter.gi
2020
The master branch is the one under development for rails 3, track the repos 2-3-stable
2121
branch for 2.x development.
2222

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.
23+
The tests of this adapter depend on the existence of the rails and/or arel source
24+
which can be cloned at git://github.com/rails/rails.git and git://github.com/rails/arel.git
2725

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.
26+
Once you have cloned these repos set the RAILS_SOURCE and AREL environment variables
27+
to their full path. For instance:
28+
29+
∴ echo $RAILS_SOURCE
30+
/Users/kencollins/Repositories/rails
31+
32+
∴ echo $AREL
33+
/Users/kencollins/Repositories/arel
34+
35+
Do not forget to checkout the version tags of each repo that match either our gemspec
36+
or what version your tests target. For instance, v3.0.3 tag for ActiveRecord and
37+
v2.0.7 for ARel.
38+
39+
40+
= Setup Connection Mode
41+
42+
The Gemfile contains groups for :tinytds and :odbc. By default it will install both gems
43+
which allows you to run the full test suite in either connection mode. If for some reason
44+
any one of these is problematic or of no concern, you could always for go the bundling
45+
of those gems with something like this.
46+
47+
∴ bundle install --without odbc
48+
49+
50+
= Finally
3351

3452
Now with all that out of the way you can run "bundle install" to hook everything up.
3553
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
54+
be able to run "rake test:dblib" which will load all the adapter tests followed by the
3755
core ActiveRecord tests. Lastly, it is typically good practice to do your work
3856
on a local branch of our remote tracking branch.
3957

4058

59+
= Current Expected Failures
60+
61+
* test_count_explicit_columns(RelationTest) <0> expected but was <7>
62+
I believe this failure is actually incorrect for other DBs to be passing and
63+
will explore a patch to rails which disables ambiguous results sets.
64+
65+
* Misc Date/Time object instance matches when using ODBC mode.
66+
67+
4168

0 commit comments

Comments
 (0)