Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Specs run in randomized order. The seed is printed at the start of the
run, e.g.:

```
==> Randomized with seed 12345 (reproduce: bundle exec rspec --seed 12345)
Randomized with seed 12345
```

To reproduce that exact run:
Expand Down
5 changes: 3 additions & 2 deletions spec/plsql/procedure_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1506,8 +1506,9 @@ def new_candidate(status)

describe "using Oracle 9.2" do
before(:all) do
# get actual database_version
plsql.connect! CONNECTION_PARAMS
# get actual database_version using the outer describe's connection;
# calling plsql.connect! here would orphan the outer session, leaking
# ruby_<outer_sid>_* temporary tables when this skip fires.
skip "Skip if the actual database version is 18c or higher" if (plsql.connection.database_version <=> [18, 0, 0, 0]) >= 0
end

Expand Down
6 changes: 5 additions & 1 deletion spec/plsql/schema_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
end

after(:all) do
plsql.connection.logoff
plsql.logoff
end

it "should find existing schema" do
Expand Down Expand Up @@ -193,6 +193,10 @@ class TestModel < TestBaseModel
end
end

after(:all) do
plsql.activerecord_class = nil
end

before(:each) do
plsql.activerecord_class = ActiveRecord::Base
end
Expand Down
4 changes: 4 additions & 0 deletions spec/plsql/variable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@
SQL
end

before(:each) do
plsql.execute "BEGIN DBMS_SESSION.RESET_PACKAGE; END;"
end

after(:all) do
plsql.execute "DROP PACKAGE test_package"
plsql.logoff
Expand Down
7 changes: 4 additions & 3 deletions spec/plsql/view_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,10 @@
end

it "should select record in view using :column => nil condition" do
employee = @employees.last
employee[:employee_id] = employee[:employee_id] + 1
employee[:hire_date] = nil
employee = @employees.last.merge(
employee_id: @employees.last[:employee_id] + 1,
hire_date: nil
)
plsql.test_employees_v.insert employee
expect(plsql.test_employees_v.first("WHERE hire_date IS NULL")).to eq(employee)
expect(plsql.test_employees_v.first(hire_date: nil)).to eq(employee)
Expand Down
6 changes: 0 additions & 6 deletions spec/spec.opts

This file was deleted.

5 changes: 5 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,8 @@ def only(*whitelist)
self.reject { |key, value| !whitelist.include?(key) }
end unless method_defined?(:only)
end

RSpec.configure do |config|
config.order = :random
Kernel.srand config.seed
end