Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 46 lines (25 sloc) 2.372 kb
911a9e6 @rsim Switched to markdown for README, added more detailed installation and…
authored
1 Creating the test database
2 --------------------------
3
4 You need Oracle database (version 10.2 or later) with SYS and SYSTEM user access.
5
6 If you are on a Mac OS X 10.6 then use [these instructions](http://blog.rayapps.com/2009/09/14/how-to-install-oracle-database-10g-on-mac-os-x-snow-leopard) to install local Oracle DB 10.2.0.4. Other option is to use Linux VM and install Oracle DB on it.
7
8 If you are on Linux (or will use Linux virtual machine) and need Oracle DB just for running tests then Oracle DB XE edition is enough. See [Oracle XE downloads page](http://www.oracle.com/technetwork/database/express-edition/downloads/index.html) for download links and instructions.
9
10 If you are getting ORA-12520 errors when running tests then it means that Oracle cannot create enough processes to handle many connections (as during tests many connections are created and destroyed). In this case you need to log in as SYSTEM user and execute e.g.
11
12 alter system set processes=200 scope=spfile;
13
14 to increase process limit and then restart the database (this will be necessary if Oracle XE will be used as default processes limit is 40).
15
16 Ruby versions
17 -------------
18
19 It is recommended to use [RVM](http://rvm.beginrescueend.com) to run tests with different Ruby implementations. oracle_enhanced is mainly tested with MRI 1.8.7 (all Rails versions) and 1.9.2 (Rails 3) and JRuby 1.6.
20
21 Running tests
22 -------------
23
24 * Create Oracle database schema for test purposes. Review `spec/spec_helper.rb` to see default schema/user names and database names (use environment variables to override defaults)
25
26 SQL> CREATE USER oracle_enhanced IDENTIFIED BY oracle_enhanced;
27 SQL> GRANT unlimited tablespace, create session, create table, create sequence, create procedure, create trigger, create view, create materialized view, create database link, create synonym, create type, ctxapp TO oracle_enhanced;
28
29 * If you use RVM then switch to corresponding Ruby (1.8.7, 1.9.2 or JRuby) and it is recommended to create isolated gemset for test purposes (e.g. rvm create gemset oracle_enhanced)
30
31 * Install bundler with
32
33 gem install bundler
34
35 * Set RAILS_GEM_VERSION to Rails version that you would like to use in oracle_enhanced tests, e.g.
36
37 export RAILS_GEM_VERSION=3.0.3
38
39 * Install necessary gems with
40
41 bundle install
42
43 * Run tests with
44
45 rake spec
Something went wrong with that request. Please try again.