Module: Mocktail::DSL

Extended by:
T::Sig
Included in:
Mocktail
Defined in:
lib/mocktail/dsl.rb,
lib/mocktail/sorbet/mocktail/dsl.rb

Instance Method Summary collapse

Instance Method Details

#stubs(ignore_block: false, ignore_extra_args: false, ignore_arity: false, times: nil, &demo) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/mocktail/dsl.rb', line 5

def stubs(ignore_block: false, ignore_extra_args: false, ignore_arity: false, times: nil, &demo)
  RegistersStubbing.new.register(demo, DemoConfig.new(
    ignore_block: ignore_block,
    ignore_extra_args: ignore_extra_args,
    ignore_arity: ignore_arity,
    times: times
  ))
end

#verify(ignore_block: false, ignore_extra_args: false, ignore_arity: false, times: nil, &demo) ⇒ Object



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

def verify(ignore_block: false, ignore_extra_args: false, ignore_arity: false, times: nil, &demo)
  VerifiesCall.new.verify(demo, DemoConfig.new(
    ignore_block: ignore_block,
    ignore_extra_args: ignore_extra_args,
    ignore_arity: ignore_arity,
    times: times
  ))
end