Module: Busted

Extended by:
Busted
Included in:
Busted
Defined in:
lib/busted.rb,
lib/busted/version.rb

Constant Summary collapse

VERSION =
"0.0.1"

Instance Method Summary collapse

Instance Method Details

#cache?(serial = nil, &blk) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
9
10
11
# File 'lib/busted.rb', line 6

def cache?(serial = nil, &blk)
  starting = count serial
  yield
  ending = count serial
  ending > starting
end

#class_cache?(&blk) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/busted.rb', line 21

def class_cache?(&blk)
  cache? :class, &blk
end

#constant_cache?(&blk) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/busted.rb', line 17

def constant_cache?(&blk)
  cache? :constant, &blk
end

#method_cache?(&blk) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/busted.rb', line 13

def method_cache?(&blk)
  cache? :method, &blk
end