Module: ExAequo::RSpex::Macros::LetMacros

Defined in:
lib/ex_aequo/rspex/macros/let_macros.rb

Instance Method Summary collapse

Instance Method Details

#let_alphanumeric_random(*names, length: 16) ⇒ Object



9
10
11
12
13
# File 'lib/ex_aequo/rspex/macros/let_macros.rb', line 9

def let_alphanumeric_random(*names, length: 16)
  for name in names do
    let(name) { SecureRandom.alphanumeric(length) }
  end
end

#let_double(name, type) ⇒ Object



15
16
17
# File 'lib/ex_aequo/rspex/macros/let_macros.rb', line 15

def let_double(name, type)
  let(name) { double(type) }
end

#let_doubles(*names, for_type:) ⇒ Object



19
20
21
22
23
# File 'lib/ex_aequo/rspex/macros/let_macros.rb', line 19

def let_doubles(*names, for_type:)
  for name in names do
    let_double(name, for_type)
  end
end