Skip to content

Commit 10aeb06

Browse files
committed
Fix failing spec on ruby 3.3
Signed-off-by: Samuel Giddins <[email protected]>
1 parent fb19685 commit 10aeb06

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

lib/gemstash/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
# :nodoc:
44
module Gemstash
5-
VERSION = "2.7.1"
5+
VERSION = "2.8.0"
66
end

spec/integration_spec.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,15 @@
169169
end
170170

171171
it "finds private gems when just the private source is configured", db_transaction: false do
172-
skip "this doesn't work because Rubygems sends /specs.4.8.gz instead of /private/specs.4.8.gz"
173172
env = { "HOME" => env_dir }
174-
expect(execute("gem", ["source", "-r", "https://rubygems.org/"], env: env)).to exit_success
175-
expect(execute("gem", ["source", "-a", host], env: env)).to exit_success
173+
expect(execute("gem", ["source", "-r", "https://rubygems.org/", "-a", host], env: env)).to exit_success
176174
expect(execute("gem", ["search", "-ar", "speaker"], env: env)).
177175
to exit_success.and_output(/speaker \(0.1.0\)/)
178176
end
179177

180178
it "finds private gems when just the private source is configured with a trailing slash", db_transaction: false do
181179
env = { "HOME" => env_dir }
182-
expect(execute("gem", ["source", "-r", "https://rubygems.org/"], env: env)).to exit_success
183-
expect(execute("gem", ["source", "-a", "#{host}/"], env: env)).to exit_success
180+
expect(execute("gem", ["source", "-r", "https://rubygems.org/", "-a", "#{host}/"], env: env)).to exit_success
184181
expect(execute("gem", ["search", "-ar", "speaker"], env: env)).
185182
to exit_success.and_output(/speaker \(0.1.0\)/)
186183
end

spec/support/exec_helpers.rb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ def exec_in_process(binstub)
144144
#{@expected_output}
145145
146146
but instead it output:
147-
#{actual.output}"
147+
#{actual.output}
148+
149+
and the error was:
150+
#{actual.err}"
148151
else
149152
"expected '#{actual.display_command}' in '#{actual.dir}' to exit with a success code, but it didn't.
150153
the command output was:
@@ -154,4 +157,12 @@ def exec_in_process(binstub)
154157
#{actual.err}"
155158
end
156159
end
160+
161+
failure_message_when_negated do |actual|
162+
"expected '#{actual.display_command}' in '#{actual.dir}' to not exit with a success code, but it did
163+
#{actual.output}
164+
165+
and the error was:
166+
#{actual.err}"
167+
end
157168
end

0 commit comments

Comments
 (0)