spec/cli/helper_spec.rb in metric_fu-4.2.1 vs spec/cli/helper_spec.rb in metric_fu-4.3.0
- old
+ new
@@ -47,10 +47,13 @@
it "enables RCov" do
defaults[:rcov].should be_true
end
+ it "runs by default" do
+ defaults[:run].should be_true
+ end
end
if MetricFu.configuration.mri?
context "on Ruby 1.8.7" do
@@ -159,9 +162,21 @@
helper.process_options(["--no-roodi"])[:roodi].should be_false
end
it "turns roodi on" do
helper.process_options(["--roodi"])[:roodi].should be_true
+ end
+
+ context 'given a single format' do
+ it "sets the format" do
+ helper.process_options(["--format", "json"])[:format].should eq([['json']])
+ end
+ end
+
+ context 'given multiple formats' do
+ it "sets multiple formats" do
+ helper.process_options(["--format", "json", "--format", "yaml"])[:format].should eq([['json'], ['yaml']])
+ end
end
end
end