module RSpec::SleepingKingStudios::Concerns::MemoizedHelpers
Methods for defining memoized helpers in example groups.
Public Instance Methods
Source
# File lib/rspec/sleeping_king_studios/concerns/memoized_helpers.rb, line 13 def let?(method_name, &) return method_name if method_defined?(method_name) let(method_name, &) end
Defines a memoized helper if a method of the same name is not defined.
@param method_name [String] the name of the helper method.
@yieldreturn [Object] the value of the memoized helper method.