Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Silence method redefined warnings when reloading thorfiles

This silences the warnings when the Thor specs are run but will still
be there when used by the end user, so it may need revisiting if we
want to eliminate warnings when using Thor as well as when testing it.
  • Loading branch information...
commit 46967595386f6b24122d10d5458aec06d4b6f428 1 parent c9d4e5a
@pixeltrix pixeltrix authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 spec/runner_spec.rb
View
8 spec/runner_spec.rb
@@ -229,12 +229,16 @@ def when_no_thorfiles_exist
else
expect(File).to receive(:delete).with(path)
end
- silence(:stdout) { Thor::Runner.start(%w[update random]) }
+ silence_warnings do
+ silence(:stdout) { Thor::Runner.start(%w[update random]) }
+ end
end
it 'installs thor files' do
ARGV.replace %W[install #{@location}]
- silence(:stdout) { Thor::Runner.start }
+ silence_warnings do
+ silence(:stdout) { Thor::Runner.start }
+ end
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.