mspec 1.5.19 → 1.5.20
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mspec/commands/mspec-run.rb +1 -1
- data/lib/mspec/version.rb +1 -1
- data/spec/commands/mspec_run_spec.rb +7 -0
- metadata +1 -1
@@ -76,7 +76,7 @@ class MSpecRun < MSpecScript
|
|
76
76
|
|
77
77
|
patterns = options.parse argv
|
78
78
|
patterns = config[:files] if patterns.empty?
|
79
|
-
patterns = "spec/" if patterns.empty? and File.directory? "./spec"
|
79
|
+
patterns = ["spec/"] if patterns.empty? and File.directory? "./spec"
|
80
80
|
if patterns.empty?
|
81
81
|
puts options
|
82
82
|
puts "No files specified."
|
data/lib/mspec/version.rb
CHANGED
@@ -126,6 +126,13 @@ describe MSpecRun, "#options" do
|
|
126
126
|
$stdout.should =~ /No files specified/
|
127
127
|
end
|
128
128
|
|
129
|
+
it "process 'spec/' if it is a directory and no files were specified" do
|
130
|
+
File.should_receive(:directory?).with("./spec").and_return(true)
|
131
|
+
@options.should_receive(:parse).and_return([])
|
132
|
+
@script.should_receive(:files).with(["spec/"])
|
133
|
+
@script.options
|
134
|
+
end
|
135
|
+
|
129
136
|
it "calls #custom_options" do
|
130
137
|
@script.should_receive(:custom_options).with(@options)
|
131
138
|
@script.options @argv
|