Skip to content

Commit 0ff5d01

Browse files
authored
Merge pull request #697 from petergoldstein/feature/add_ruby_3_2_to_ci
Add Ruby 3.2 to the CI matrix
2 parents c57ab08 + b1434d2 commit 0ff5d01

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
ruby-version:
12+
- '3.2'
1213
- '3.1'
1314
- '3.0'
1415
- '2.7'
@@ -27,7 +28,7 @@ jobs:
2728
- 6379:6379
2829

2930
steps:
30-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@v3
3132
- name: Set up Ruby ${{ matrix.ruby-version }}
3233
uses: ruby/setup-ruby@v1
3334
with:

lib/database_cleaner/safeguard.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,11 @@ def given?
5353

5454
def remote?(url)
5555
return false unless url
56-
5756
parsed = URI.parse(url)
5857
return false if parsed.scheme == 'sqlite3:'
5958

6059
host = parsed.host
61-
return false unless host
60+
return false if host.nil? || host.empty?
6261
return false if LOCAL.include?(host)
6362
return false if host.end_with? '.local'
6463
true

spec/database_cleaner/cleaner_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ module DatabaseCleaner
9898
end
9999

100100
it "should pass all arguments to strategy initializer" do
101-
expect(strategy_class).to receive(:new).with(:dollar, :amet, ipsum: "random").and_return(strategy)
101+
expect(strategy_class).to receive(:new).with(:dollar, :amet, { ipsum: "random" }).and_return(strategy)
102102
expect(strategy).to receive(:clean)
103103
cleaner.clean_with :truncation, :dollar, :amet, ipsum: "random"
104104
end
@@ -145,12 +145,12 @@ module DatabaseCleaner
145145
end
146146

147147
it "should proxy params with symbolised strategies in an array" do
148-
expect(strategy_class).to receive(:new).with(param: "one")
148+
expect(strategy_class).to receive(:new).with({ param: "one" })
149149
cleaner.strategy = [:truncation, param: "one"]
150150
end
151151

152152
it "should proxy params with symbolised strategies in a separate hash" do
153-
expect(strategy_class).to receive(:new).with(param: "one")
153+
expect(strategy_class).to receive(:new).with({ param: "one" })
154154
cleaner.strategy = :truncation, { param: "one" }
155155
end
156156

0 commit comments

Comments
 (0)