Permalink
Browse files

Create the FakeFS directory before creating files in it.

- this appears to have broken with an upgrade to FakeFS.
- Fixes #51.
  • Loading branch information...
1 parent 45e9b8c commit 7c7869d2ca5e9ebb06ce2022f9ebcb7114f4c6c1 @dchelimsky dchelimsky committed Feb 7, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 spec/spec/runner/option_parser_spec.rb
@@ -14,7 +14,7 @@ def parse(args)
@parser.options
end
- describe "with fakefs" do
+ describe "defaults" do
include FakeFS::SpecHelpers
it "should not use colour by default" do
@@ -526,14 +526,17 @@ def parse(args)
describe "implicitly loading spec/spec.opts" do
include FakeFS::SpecHelpers
+ before do
+ FileUtils.mkdir_p('spec')
+ end
+
it "uses spec/spec.opts if present" do
File.open('spec/spec.opts', 'w') { |f| f.write "--colour" }
options = parse(['ignore.rb'])
options.colour.should be(true)
end
it "does not try to load spec/spec.opts if not present" do
- FileUtils.rm 'spec/spec.opts'
options = parse(['ignore.rb'])
options.colour.should be(false)
end
@@ -546,6 +549,4 @@ def parse(args)
options.colour.should be(true)
end
end
-
-
end

0 comments on commit 7c7869d

Please sign in to comment.