mspec 1.5.19 → 1.5.20

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -1,5 +1,5 @@
1
1
  require 'mspec/utils/version'
2
2
 
3
3
  module MSpec
4
- VERSION = SpecVersion.new "1.5.19"
4
+ VERSION = SpecVersion.new "1.5.20"
5
5
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.19
4
+ version: 1.5.20
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: