Module: Punchbowl::InstanceMethods

Defined in:
lib/fastory.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(receiver) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fastory.rb', line 6

def self.included(receiver)
  Fastory.sql_inserts = []
  Fastory.fastories = {}

  receiver.instance_eval do
    alias_method_chain :teardown, :fastory_refresh
  end
end

Instance Method Details

#teardown_with_fastory_refreshObject



15
16
17
18
19
20
21
# File 'lib/fastory.rb', line 15

def teardown_with_fastory_refresh
  Fastory.fastories.each do |k,v|
    Fastory.fastories[k][:templates_used] = 0
  end

  teardown_without_fastory_refresh
end