Skip to content

Commit

Permalink
stub out file system for CLI tests
Browse files Browse the repository at this point in the history
prevents creating real files and folders
  • Loading branch information
Dorian Karter committed Apr 8, 2015
1 parent b1da10f commit 09b53c7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,21 @@
require_relative '../lib/sandi_meter/cli'

describe SandiMeter::CLI do
include FakeFS::SpecHelpers

let(:cli) { SandiMeter::CLI }
let(:gem_root) { File.expand_path('../', File.dirname(__FILE__)) }

before do
FakeFS.activate!

FakeFS::FileSystem.clone(gem_root)
end

after do
FakeFS.deactivate!
end

describe '#execute' do
before do
@original_argv = ARGV
Expand Down

0 comments on commit 09b53c7

Please sign in to comment.