mspec 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -161,6 +161,11 @@ describe MSpecScript, "#register" do
161
161
  @formatter.should_receive(:register)
162
162
  @script.register
163
163
  end
164
+
165
+ it "does not register the formatter if config[:formatter] is nil" do
166
+ @script.config[:formatter] = nil
167
+ @script.register
168
+ end
164
169
  end
165
170
 
166
171
  describe MSpecScript, "#register" do
@@ -263,3 +268,30 @@ describe MSpecScript, "#signals" do
263
268
  @script.signals
264
269
  end
265
270
  end
271
+
272
+ describe MSpecScript, "#files" do
273
+ before :each do
274
+ @script = MSpecScript.new
275
+ end
276
+
277
+ it "returns entries unchanged if they are files" do
278
+ stat = mock("Stat")
279
+ stat.stub!(:file?).and_return(true)
280
+ stat.stub!(:directory?).and_return(false)
281
+ File.stub!(:stat).and_return(stat)
282
+ @script.files(["a", "b"]).should == ["a", "b"]
283
+ end
284
+
285
+ it "searches for _spec.rb files if the entry is a directory" do
286
+ File.should_receive(:expand_path).with("some/dir").and_return("some/dir")
287
+ stat = mock("Stat")
288
+ stat.should_receive(:file?).and_return(false)
289
+ stat.should_receive(:directory?).and_return(true)
290
+ File.stub!(:stat).and_return(stat)
291
+
292
+ Dir.should_receive(:[]).with("some/dir/**/*_spec.rb").and_return(
293
+ ["some/dir/file_spec.rb", "some/dir/other_spec.rb"])
294
+ @script.files(["some/dir"]).should ==
295
+ ["some/dir/file_spec.rb", "some/dir/other_spec.rb"]
296
+ end
297
+ end
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.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Ford
@@ -53,6 +53,7 @@ files:
53
53
  - lib/mspec/helpers/const_lookup.rb
54
54
  - lib/mspec/helpers/flunk.rb
55
55
  - lib/mspec/helpers/io.rb
56
+ - lib/mspec/helpers/ruby_exe.rb
56
57
  - lib/mspec/helpers/scratch.rb
57
58
  - lib/mspec/helpers/tmp.rb
58
59
  - lib/mspec/helpers.rb
@@ -79,10 +80,12 @@ files:
79
80
  - lib/mspec/mocks/object.rb
80
81
  - lib/mspec/mocks/proxy.rb
81
82
  - lib/mspec/mocks.rb
83
+ - lib/mspec/ruby_name.rb
82
84
  - lib/mspec/runner/actions/debug.rb
83
85
  - lib/mspec/runner/actions/filter.rb
84
86
  - lib/mspec/runner/actions/gdb.rb
85
87
  - lib/mspec/runner/actions/tag.rb
88
+ - lib/mspec/runner/actions/taglist.rb
86
89
  - lib/mspec/runner/actions/tally.rb
87
90
  - lib/mspec/runner/actions/timer.rb
88
91
  - lib/mspec/runner/actions.rb
@@ -139,6 +142,7 @@ files:
139
142
  - spec/helpers/const_lookup_spec.rb
140
143
  - spec/helpers/flunk_spec.rb
141
144
  - spec/helpers/io_spec.rb
145
+ - spec/helpers/ruby_exe_spec.rb
142
146
  - spec/helpers/scratch_spec.rb
143
147
  - spec/helpers/tmp_spec.rb
144
148
  - spec/matchers/base_spec.rb
@@ -165,6 +169,7 @@ files:
165
169
  - spec/runner/actions/filter_spec.rb
166
170
  - spec/runner/actions/gdb_spec.rb
167
171
  - spec/runner/actions/tag_spec.rb
172
+ - spec/runner/actions/taglist_spec.rb
168
173
  - spec/runner/actions/tally_spec.rb
169
174
  - spec/runner/actions/timer_spec.rb
170
175
  - spec/runner/context_spec.rb