Testing Rails with a legacy oracle schema as a backend is always a challenge (fun?). Rails relies no schema.rb to create its test database. The problem is that using the latest activerecord-oracle_enhanced-adapter (1.4.0), the application is unaware of the database views. So, I’ve decided to create those DB views (development) as DB tables (test).
The script can run as a db:test:prepare rake task or as being explicitly required somewhere at the beginning of the test_helper. And of course, this is just the initial working concept – it can be greatly improved. JRuby 1.6.3 Rails 3.1 activerecord-oracle_enhanced-adapter 1.4.0