Module: Gimme
- Defined in:
- lib/gimme/dsl.rb,
lib/gimme/gives.rb,
lib/gimme/reset.rb,
lib/gimme/store.rb,
lib/gimme/captor.rb,
lib/gimme/errors.rb,
lib/gimme/matchers.rb,
lib/gimme/verifies.rb,
lib/gimme/test_double.rb,
lib/gimme/method_store.rb,
lib/gimme/compares_args.rb,
lib/gimme/rspec_adapter.rb,
lib/gimme/stubbing_store.rb,
lib/gimme/finds_stubbings.rb,
lib/gimme/invocation_store.rb,
lib/gimme/resolves_methods.rb,
lib/gimme/gives_class_methods.rb,
lib/gimme/spies_on_class_methods.rb,
lib/gimme/verifies_class_methods.rb,
lib/gimme/invokes_satisfied_stubbing.rb,
lib/gimme/ensures_class_method_restoration.rb
Defined Under Namespace
Modules: DSL, Errors, Matchers, RSpecAdapter
Classes: BlankSlate, Captor, ClassMethodStore, ComparesArgs, EnsuresClassMethodRestoration, FindsStubbings, Gives, GivesClassMethods, InvocationStore, InvokesSatisfiedStubbing, ResolvesMethods, SpiesOnClassMethod, Store, StubbingStore, TestDouble, Verifies, VerifiesClassMethods
Constant Summary
collapse
- @@stuff_to_do_on_reset =
[]
- @@stuff_to_do_on_every_reset =
[]
Class Method Summary
collapse
Class Method Details
.class_methods ⇒ Object
17
18
19
|
# File 'lib/gimme/method_store.rb', line 17
def self.class_methods
@@class_methods ||= ClassMethodStore.new
end
|
.invocations ⇒ Object
10
11
12
|
# File 'lib/gimme/invocation_store.rb', line 10
def self.invocations
@@invocations ||= InvocationStore.new
end
|
.on_reset(situation = :once, &blk) ⇒ Object
5
6
7
8
9
10
11
|
# File 'lib/gimme/reset.rb', line 5
def self.on_reset (situation = :once, &blk)
if situation == :once
@@stuff_to_do_on_reset << blk
else
@@stuff_to_do_on_every_reset << blk
end
end
|
.reset ⇒ Object
13
14
15
16
|
# File 'lib/gimme/reset.rb', line 13
def self.reset
@@stuff_to_do_on_reset.delete_if { |stuff| stuff.call || true }
@@stuff_to_do_on_every_reset.each { |stuff| stuff.call }
end
|
.stubbings ⇒ Object
13
14
15
|
# File 'lib/gimme/stubbing_store.rb', line 13
def self.stubbings
@@stubbings ||= StubbingStore.new
end
|