File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,12 @@ def options(argv=ARGV)
71
71
options . doc "\n $ mspec --spec-debug -S 'this crashes' path/to/the_file_spec.rb"
72
72
options . doc "\n 4. To run some specs matching 'this crashes'"
73
73
options . doc "\n $ mspec -e 'this crashes' path/to/the_file_spec.rb"
74
-
74
+
75
75
options . doc ""
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
80
if patterns . empty?
80
81
puts options
81
82
puts "No files specified."
Original file line number Diff line number Diff line change 118
118
@script . options @argv
119
119
end
120
120
121
- it "exits if there are no files to process" do
121
+ it "exits if there are no files to process and './spec' is not a directory" do
122
+ File . should_receive ( :directory? ) . with ( "./spec" ) . and_return ( false )
122
123
@options . should_receive ( :parse ) . and_return ( [ ] )
123
124
@script . should_receive ( :exit )
124
125
@script . options
You can’t perform that action at this time.
0 commit comments