From cfbc50afe8a7c1e182fb6b0b4a8dbafdd33c5ce2 Mon Sep 17 00:00:00 2001 From: Wild Kat Date: Wed, 11 Apr 2018 21:41:04 +0200 Subject: ensure asetus is initialized regardless of test execution order --- spec/cli_spec.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'spec/cli_spec.rb') diff --git a/spec/cli_spec.rb b/spec/cli_spec.rb index eb9872e..bf6058a 100644 --- a/spec/cli_spec.rb +++ b/spec/cli_spec.rb @@ -2,8 +2,14 @@ require 'spec_helper' require 'oxidized/cli' describe Oxidized::CLI do - before { @original = ARGV } - after { ARGV.replace @original } + before(:each) do + @original = ARGV + Oxidized.asetus = Asetus.new + end + + after(:each) do + ARGV.replace @original + end %w[-v --version].each do |option| describe option do -- cgit v1.2.1 From 21e3d6490496573f25ef77fe8172766ac7d1a736 Mon Sep 17 00:00:00 2001 From: Wild Kat Date: Sat, 21 Apr 2018 13:27:05 +0200 Subject: the great makeover - standardize layout, alignment, indentation --- spec/cli_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spec/cli_spec.rb') diff --git a/spec/cli_spec.rb b/spec/cli_spec.rb index bf6058a..4ceb8ed 100644 --- a/spec/cli_spec.rb +++ b/spec/cli_spec.rb @@ -2,11 +2,11 @@ require 'spec_helper' require 'oxidized/cli' describe Oxidized::CLI do - before(:each) do - @original = ARGV - Oxidized.asetus = Asetus.new + before(:each) do + @original = ARGV + Oxidized.asetus = Asetus.new end - + after(:each) do ARGV.replace @original end -- cgit v1.2.1 From 75765bedae8a8511260d43ec7f46edc994899c7c Mon Sep 17 00:00:00 2001 From: Wild Kat Date: Wed, 25 Apr 2018 19:06:19 +0200 Subject: fix cli_spec.rb to reflect new version output --- spec/cli_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/cli_spec.rb') diff --git a/spec/cli_spec.rb b/spec/cli_spec.rb index 4ceb8ed..8b9b792 100644 --- a/spec/cli_spec.rb +++ b/spec/cli_spec.rb @@ -21,7 +21,7 @@ describe Oxidized::CLI do File.expects(:expand_path) Kernel.expects(:exit) - assert_output("#{Oxidized::VERSION}\n") { Oxidized::CLI.new } + assert_output("#{Oxidized::VERSION_FULL}\n") { Oxidized::CLI.new } end end end -- cgit v1.2.1