Add FakeFS gem to test suite

This commit is contained in:
Netscape Navigator 2019-10-09 19:43:23 -05:00
parent 63b2ac99ed
commit 40a8a46aa4
4 changed files with 16 additions and 1 deletions

View File

@ -6,7 +6,8 @@ gem "ed25519"
gem "thor"
group :dev do
gem "rspec"
gem "fakefs"
gem "pry"
gem "rspec"
gem "simplecov"
end

View File

@ -5,6 +5,7 @@ GEM
diff-lcs (1.3)
docile (1.3.2)
ed25519 (1.2.4)
fakefs (0.20.1)
json (2.2.0)
method_source (0.9.2)
pry (0.12.2)
@ -35,6 +36,7 @@ PLATFORMS
DEPENDENCIES
ed25519
fakefs
pry
rspec
simplecov

View File

@ -0,0 +1,10 @@
require "spec_helper"
RSpec.describe Pigeon::Storage do
include FakeFS::SpecHelpers
it "does something to the filesystem" do
FakeFS.with_fresh do
expect(2 + 2).to eq(4)
end
end
end

View File

@ -1,5 +1,7 @@
require "pry"
require "simplecov"
require "fakefs/spec_helpers"
SimpleCov.start
require_relative File.join("..", "dist", "pigeon")
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration