Skip to content
This repository
Browse code

Create the FakeFS directory before creating files in it.

- this appears to have broken with an upgrade to FakeFS.
- Fixes #51.
commit 7c7869d2ca5e9ebb06ce2022f9ebcb7114f4c6c1 1 parent 45e9b8c
David Chelimsky authored February 07, 2012

Showing 1 changed file with 5 additions and 4 deletions. Show diff stats Hide diff stats

  1. 9  spec/spec/runner/option_parser_spec.rb
9  spec/spec/runner/option_parser_spec.rb
@@ -14,7 +14,7 @@ def parse(args)
14 14
     @parser.options
15 15
   end
16 16
   
17  
-  describe "with fakefs" do
  17
+  describe "defaults" do
18 18
     include FakeFS::SpecHelpers
19 19
 
20 20
     it "should not use colour by default" do
@@ -526,6 +526,10 @@ def parse(args)
526 526
   describe "implicitly loading spec/spec.opts" do
527 527
     include FakeFS::SpecHelpers
528 528
 
  529
+    before do
  530
+      FileUtils.mkdir_p('spec')
  531
+    end
  532
+
529 533
     it "uses spec/spec.opts if present" do
530 534
       File.open('spec/spec.opts', 'w') { |f| f.write "--colour" }
531 535
       options = parse(['ignore.rb'])
@@ -533,7 +537,6 @@ def parse(args)
533 537
     end
534 538
   
535 539
     it "does not try to load spec/spec.opts if not present" do
536  
-      FileUtils.rm 'spec/spec.opts'
537 540
       options = parse(['ignore.rb'])
538 541
       options.colour.should be(false)
539 542
     end
@@ -546,6 +549,4 @@ def parse(args)
546 549
       options.colour.should be(true)
547 550
     end
548 551
   end
549  
-  
550  
-  
551 552
 end

0 notes on commit 7c7869d

Please sign in to comment.
Something went wrong with that request. Please try again.