Skip to content

Commit 88c97fc

Browse files
committed
Attempt to fix integration specs on postgres on ci
1 parent 604160d commit 88c97fc

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

lib/gemstash/compact_index_builder.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ def compact_index_versions(date)
115115
ORDER BY date, number, platform, name
116116
SQL
117117

118-
# not ordered correctly in sqlite for some reason
119-
all_versions.sort_by! {|v| [v[:date], v[:number], v[:platform], v[:name]] }
120118
map_gem_versions(all_versions.map {|v| [v[:name], [v]] })
121119
end
122120

spec/integration_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@
236236
shared_examples "a bundleable project" do
237237
it "successfully bundles" do
238238
env = { "HOME" => dir }
239-
expect(execute("bundle", dir: dir, env: env)).to exit_success
239+
expect(execute("bundle", %w[install --verbose], dir: dir, env: env)).to exit_success
240240
expect(execute("bundle", %w[exec speaker hi], dir: dir, env: env)).
241241
to exit_success.and_output("Hello world, #{platform_message}\n")
242242
end

spec/support/exec_helpers.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def execute(command, args = [], dir: nil, env: {})
1616

1717
# Executes and stores the results for an external command.
1818
class Result
19-
attr_reader :command, :args, :dir, :output
19+
attr_reader :command, :args, :dir, :output, :err
2020

2121
def initialize(env, command, args, dir)
2222
@command = command
@@ -29,7 +29,7 @@ def initialize(env, command, args, dir)
2929
end
3030

3131
def exec
32-
@output, @status = Open3.capture2(patched_env, command, *args, chdir: dir)
32+
@output, @err, @status = Open3.capture3(patched_env, command, *args, chdir: dir)
3333
end
3434

3535
def successful?
@@ -148,7 +148,10 @@ def exec_in_process(binstub)
148148
else
149149
"expected '#{actual.display_command}' in '#{actual.dir}' to exit with a success code, but it didn't.
150150
the command output was:
151-
#{actual.output}"
151+
#{actual.output}
152+
153+
and the error was:
154+
#{actual.err}"
152155
end
153156
end
154157
end

0 commit comments

Comments
 (0)