Permalink
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...
1 parent c9d4e5a commit 46967595386f6b24122d10d5458aec06d4b6f428 @pixeltrix pixeltrix committed Dec 30, 2013
Showing with 6 additions and 2 deletions.
  1. +6 −2 spec/runner_spec.rb
View
@@ -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

0 comments on commit 4696759

Please sign in to comment.