1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
Description: Fall back to the installed gem if lib doesn't exist
Author: Simon Quigley <tsimonq2@debian.org>
Origin: vendor
Last-Update: 2026-02-23
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,8 +1,13 @@
# frozen_string_literal: true
require "pry"
-require_relative "../lib/retriable"
-require_relative "support/exceptions"
+begin
+ require_relative "../lib/retriable"
+ require_relative "support/exceptions"
+rescue LoadError
+ require "retriable"
+ require "support/exceptions"
+end
RSpec.configure do |config|
config.before(:each) do
--- a/spec/retriable_spec.rb
+++ b/spec/retriable_spec.rb
@@ -27,7 +27,11 @@ describe Retriable do
end
it "can be called once the kernel extension is required" do
- require_relative "../lib/retriable/core_ext/kernel"
+ begin
+ require_relative "../lib/retriable/core_ext/kernel"
+ rescue LoadError
+ require "retriable/core_ext/kernel"
+ end
expect { retriable { increment_tries_with_exception } }.to raise_error(StandardError)
expect(@tries).to eq(3)
|