summaryrefslogtreecommitdiff
path: root/spec/cli_spec.rb
diff options
context:
space:
mode:
authorElvin Efendi <elvin.efendiyev@gmail.com>2016-06-02 23:53:29 +0200
committerElvin Efendi <elvin.efendiyev@gmail.com>2016-06-02 23:53:29 +0200
commitaef81bd14989797d26d349fdf1a517045f5af33c (patch)
treedb194c27c1fa4c8542a048e4afd8dcb0793acb27 /spec/cli_spec.rb
parent779f20dd18a361b5bde51f3f11c6d048efe100a0 (diff)
parent64bdbeb673a8ab7155478ee5e0d1d58c1631a9d3 (diff)
Merge pull request #25 from Shopify/debug-statements
Debug statements
Diffstat (limited to 'spec/cli_spec.rb')
-rw-r--r--spec/cli_spec.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/spec/cli_spec.rb b/spec/cli_spec.rb
index 0a6c91b..eb9872e 100644
--- a/spec/cli_spec.rb
+++ b/spec/cli_spec.rb
@@ -2,23 +2,20 @@ require 'spec_helper'
require 'oxidized/cli'
describe Oxidized::CLI do
- let(:asetus) { mock() }
-
- after { ARGV.replace @original }
before { @original = ARGV }
+ after { ARGV.replace @original }
%w[-v --version].each do |option|
describe option do
- before { ARGV.replace [option] }
+ before { ARGV.replace([option]) }
it 'prints the version and exits' do
Oxidized::Config.expects(:load)
Oxidized.expects(:setup_logger)
+ File.expects(:expand_path)
Kernel.expects(:exit)
- proc {
- Oxidized::CLI.new
- }.must_output "#{Oxidized::VERSION}\n"
+ assert_output("#{Oxidized::VERSION}\n") { Oxidized::CLI.new }
end
end
end