spec/rake/funnel/support/internal/finder_spec.rb in rake-funnel-0.18.0 vs spec/rake/funnel/support/internal/finder_spec.rb in rake-funnel-0.19.0
- old
+ new
@@ -1,29 +1,31 @@
+# rubocop:disable RSpec/FilePath
+
require 'tmpdir'
include Rake::Funnel
describe Rake::Funnel::Support::Finder do
let(:pattern) { %W(#{temp_dir}/**/*.sln #{temp_dir}/**/*.??proj) }
let(:generate) { [] }
let(:temp_dir) { Dir.mktmpdir }
- before {
+ before do
Dir.chdir(temp_dir) do
([] << generate).flatten.each do |file|
FileUtils.mkdir_p(File.dirname(file))
FileUtils.touch(file)
end
end
- }
+ end
- after {
+ after do
FileUtils.rm_rf(temp_dir)
- }
+ end
- subject {
+ subject do
described_class.new(pattern, OpenStruct.new(name: 'task name'), 'error message')
- }
+ end
def map_temp(*files)
mapped = files.map { |f| File.join(temp_dir, f) }
return mapped.first if mapped.one?
mapped