Created
July 26, 2012 21:52
-
-
Save masarakki/3184800 to your computer and use it in GitHub Desktop.
fakefsとopen-uriの共存
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spec/spec_helper.rb | |
module FakeFS | |
module DefaultSettingHelper | |
def self.extended(example_group) | |
example_group.default_settings(example_group) | |
end | |
def self.included(example_group) | |
example_group.extend self | |
end | |
def default_settings(describe_block) | |
describe_block.before :each do | |
FakeFS::FileSystem.add File.expand_path('../../',__FILE__) | |
FakeFS::FileSystem.add File.expand_path '/tmp' | |
end | |
end | |
end | |
end | |
RSpec.configure do |config| | |
config.include FakeFS::SpecHelpers | |
config.include FakeFS::DefaultSettingHelper | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment