From 57daf287422d423466db742e66488708940a64a5 Mon Sep 17 00:00:00 2001 From: Colin Kelley Date: Tue, 17 Aug 2021 21:59:07 -0700 Subject: [PATCH] use **options in spec for newer Ruby versions --- spec/lib/listen/record_spec.rb | 2 +- spec/lib/listen/silencer_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/lib/listen/record_spec.rb b/spec/lib/listen/record_spec.rb index 1f883e22..919ad0d5 100644 --- a/spec/lib/listen/record_spec.rb +++ b/spec/lib/listen/record_spec.rb @@ -3,7 +3,7 @@ RSpec.describe Listen::Record do let(:dir) { instance_double(Pathname, to_s: '/dir') } let(:silencer_options) { { ignore!: [/\A\.ignored/] } } - let(:silencer) { Listen::Silencer.new(silencer_options) } + let(:silencer) { Listen::Silencer.new(**silencer_options) } let(:record) { Listen::Record.new(dir, silencer) } def dir_entries_for(hash) diff --git a/spec/lib/listen/silencer_spec.rb b/spec/lib/listen/silencer_spec.rb index 28412dc7..8d4145fa 100644 --- a/spec/lib/listen/silencer_spec.rb +++ b/spec/lib/listen/silencer_spec.rb @@ -6,7 +6,7 @@ RSpec.describe Listen::Silencer do let(:options) { {} } - subject { described_class.new(options) } + subject { described_class.new(**options) } describe '#silenced?' do it { should accept(:file, Pathname('some_dir').join("some_file.rb")) }