Module: Fakeout::SpecHelpers

Includes:
TestHelpers
Defined in:
lib/fakeout/spec_helpers.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from TestHelpers

#stderr, #stdout

Class Method Details

.extended(spec) ⇒ Object



5
6
7
# File 'lib/fakeout/spec_helpers.rb', line 5

def self.extended(spec)
  spec.fakeout(spec)
end

.included(spec) ⇒ Object



9
10
11
# File 'lib/fakeout/spec_helpers.rb', line 9

def self.included(spec)
  spec.extend(self)
end

Instance Method Details

#fakeout(spec) ⇒ Object



13
14
15
16
# File 'lib/fakeout/spec_helpers.rb', line 13

def fakeout(spec)
  spec.before { Fakeout.activate! }
  spec.after  { Fakeout.deactivate! }
end