Skip to content
Browse files

Fix broken specs, update to latest fakefs

Ensure that the fake temporary root directory is always created
before adding files to it.
  • Loading branch information...
1 parent ccd97c3 commit 8436c195cc3a31b6363038d4df36cfb45707cfc9 @ldenman ldenman committed Nov 24, 2012
Showing with 63 additions and 23 deletions.
  1. +1 −1 Gemfile
  2. +60 −21 Gemfile.lock
  3. +1 −1 generator_spec.gemspec
  4. +1 −0 spec/support/file_system.rb
View
2 Gemfile
@@ -1,3 +1,3 @@
source "http://rubygems.org"
-gemspec
+gemspec
View
81 Gemfile.lock
@@ -3,41 +3,80 @@ PATH
specs:
generator_spec (0.8.5)
activerecord (>= 3.0, < 4.0)
+ railties (>= 3.0, < 4.0)
GEM
- remote: https://rubygems.org/
+ remote: http://rubygems.org/
specs:
- activemodel (3.2.2)
- activesupport (= 3.2.2)
+ actionpack (3.2.9)
+ activemodel (= 3.2.9)
+ activesupport (= 3.2.9)
builder (~> 3.0.0)
- activerecord (3.2.2)
- activemodel (= 3.2.2)
- activesupport (= 3.2.2)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.4)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.2.1)
+ activemodel (3.2.9)
+ activesupport (= 3.2.9)
+ builder (~> 3.0.0)
+ activerecord (3.2.9)
+ activemodel (= 3.2.9)
+ activesupport (= 3.2.9)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activesupport (3.2.2)
+ activesupport (3.2.9)
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
- builder (3.0.0)
+ builder (3.0.4)
diff-lcs (1.1.3)
- fakefs (0.3.1)
- i18n (0.6.0)
- multi_json (1.1.0)
- rspec (2.8.0)
- rspec-core (~> 2.8.0)
- rspec-expectations (~> 2.8.0)
- rspec-mocks (~> 2.8.0)
- rspec-core (2.8.0)
- rspec-expectations (2.8.0)
- diff-lcs (~> 1.1.2)
- rspec-mocks (2.8.0)
- tzinfo (0.3.32)
+ erubis (2.7.0)
+ fakefs (0.4.1)
+ hike (1.2.1)
+ i18n (0.6.1)
+ journey (1.0.4)
+ json (1.7.5)
+ multi_json (1.3.7)
+ rack (1.4.1)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.2)
+ rack (>= 1.0)
+ railties (3.2.9)
+ actionpack (= 3.2.9)
+ activesupport (= 3.2.9)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (>= 0.14.6, < 2.0)
+ rake (10.0.2)
+ rdoc (3.12)
+ json (~> 1.4)
+ rspec (2.12.0)
+ rspec-core (~> 2.12.0)
+ rspec-expectations (~> 2.12.0)
+ rspec-mocks (~> 2.12.0)
+ rspec-core (2.12.0)
+ rspec-expectations (2.12.0)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.12.0)
+ sprockets (2.2.1)
+ hike (~> 1.2)
+ multi_json (~> 1.0)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ thor (0.16.0)
+ tilt (1.3.3)
+ tzinfo (0.3.35)
PLATFORMS
ruby
DEPENDENCIES
- fakefs (~> 0.3.1)
+ fakefs (~> 0.4.1)
generator_spec!
rspec
View
2 generator_spec.gemspec
@@ -21,5 +21,5 @@ Gem::Specification.new do |s|
s.add_dependency 'activerecord', ['>= 3.0', '< 4.0']
s.add_dependency 'railties', ['>= 3.0', '< 4.0']
s.add_development_dependency 'rspec'
- s.add_development_dependency 'fakefs', '~> 0.3.1'
+ s.add_development_dependency 'fakefs', '~> 0.4.1'
end
View
1 spec/support/file_system.rb
@@ -1,6 +1,7 @@
module Helpers
module FileSystem
def write_file(file_name, contents)
+ write_directory(TMP_ROOT)
::File.open(file_name.to_s, 'w') {|f| f.write(contents) }
end

1 comment on commit 8436c19

@parndt
Collaborator
parndt commented on 8436c19 Nov 26, 2012

Legend!

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