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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
Description: Fix the path for including spec_helper
Author: Simon Quigley <tsimonq2@debian.org>
Origin: vendor
Forwarded: not-needed
Last-Update: 2026-03-06
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -9,7 +9,11 @@ end
SimpleCov.start
-require_relative '../lib/filewatcher/spec_helper'
+begin
+ require_relative '../lib/filewatcher/spec_helper'
+rescue LoadError
+ require 'filewatcher/spec_helper'
+end
RSpec.configure do |config|
config.example_status_persistence_file_path = "#{__dir__}/examples.txt"
--- a/spec/filewatcher/snapshot_spec.rb
+++ b/spec/filewatcher/snapshot_spec.rb
@@ -1,6 +1,10 @@
# frozen_string_literal: true
-require_relative '../../lib/filewatcher/snapshot'
+begin
+ require_relative '../../lib/filewatcher/snapshot'
+rescue LoadError
+ require 'filewatcher/snapshot'
+end
describe Filewatcher::Snapshot do
let(:tmp_dir) { Filewatcher::SpecHelper::WatchRun::TMP_DIR }
--- a/spec/filewatcher/version_spec.rb
+++ b/spec/filewatcher/version_spec.rb
@@ -1,6 +1,10 @@
# frozen_string_literal: true
-require_relative '../../lib/filewatcher/version'
+begin
+ require_relative '../../lib/filewatcher/version'
+rescue LoadError
+ require 'filewatcher/version'
+end
describe 'Filewatcher::VERSION' do
subject { Object.const_get(self.class.description) }
--- a/spec/filewatcher_spec.rb
+++ b/spec/filewatcher_spec.rb
@@ -1,7 +1,11 @@
# frozen_string_literal: true
require 'fileutils'
-require_relative '../lib/filewatcher'
+begin
+ require_relative '../lib/filewatcher'
+rescue LoadError
+ require 'filewatcher'
+end
describe Filewatcher do
subject(:processed) { watch_run.processed }
|