diff options
author | Elvin Efendi <elvin.efendiyev@gmail.com> | 2016-06-02 23:41:42 +0200 |
---|---|---|
committer | Elvin Efendi <elvin.efendiyev@gmail.com> | 2016-06-02 23:41:42 +0200 |
commit | 369bf7c96cfcf342c55f7a57170bd00c352154e3 (patch) | |
tree | 5755db4b505f1070771adf7316a3d96f1296b3af | |
parent | 7000d42b8634396b518568939bb1f6ac9e49e4d3 (diff) |
cleaner spec
-rw-r--r-- | lib/oxidized/input/.telnet.rb.swp | bin | 0 -> 16384 bytes | |||
-rw-r--r-- | lib/oxidized/worker.rb | 2 | ||||
-rw-r--r-- | spec/cli_spec.rb | 14 |
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/oxidized/input/.telnet.rb.swp b/lib/oxidized/input/.telnet.rb.swp Binary files differnew file mode 100644 index 0000000..dc6503d --- /dev/null +++ b/lib/oxidized/input/.telnet.rb.swp diff --git a/lib/oxidized/worker.rb b/lib/oxidized/worker.rb index 7aec42a..1952d01 100644 --- a/lib/oxidized/worker.rb +++ b/lib/oxidized/worker.rb @@ -28,7 +28,7 @@ module Oxidized @jobs.push Job.new node Oxidized.logger.debug "lib/oxidized/worker.rb: Added #{node.name} to the job queue" end - Oxidized.logger.debug "lib/oxidized/worker.rb: #{@jobs.size} jobs running in parallel" + Oxidized.logger.debug("lib/oxidized/worker.rb: #{@jobs.size} jobs running in parallel") unless @jobs.empty? end def process job diff --git a/spec/cli_spec.rb b/spec/cli_spec.rb index b248766..f3e7cb4 100644 --- a/spec/cli_spec.rb +++ b/spec/cli_spec.rb @@ -2,21 +2,21 @@ require 'spec_helper' require 'oxidized/cli' describe Oxidized::CLI do - let(:asetus) { mock() } - + before do + @original = ARGV + @asetus = Asetus.new + end after { ARGV.replace @original } - before { @original = ARGV } %w[-v --version].each do |option| describe option do - before { ARGV.push(option) } + before { ARGV.replace([option]) } it 'prints the version and exits' do + Asetus.expects(:new).returns(@asetus) Kernel.expects(:exit) - proc { - Oxidized::CLI.new - }.must_output "#{Oxidized::VERSION}\n" + assert_output("#{Oxidized::VERSION}\n") { Oxidized::CLI.new } end end end |