mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Change DSL::Values to DSL::Memoize
This commit is contained in:
parent
3cd569e639
commit
3083f82132
3 changed files with 4 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
require "../source"
|
require "../source"
|
||||||
require "./builder"
|
require "./builder"
|
||||||
require "./tags"
|
require "./tags"
|
||||||
require "./values"
|
require "./memoize"
|
||||||
|
|
||||||
module Spectator::DSL
|
module Spectator::DSL
|
||||||
# DSL methods and macros for creating example groups.
|
# DSL methods and macros for creating example groups.
|
||||||
|
|
|
@ -2,7 +2,8 @@ require "../lazy_wrapper"
|
||||||
|
|
||||||
module Spectator::DSL
|
module Spectator::DSL
|
||||||
# DSL methods for defining test values (subjects).
|
# DSL methods for defining test values (subjects).
|
||||||
module Values
|
# These values are stored and reused throughout the test.
|
||||||
|
module Memoize
|
||||||
# Defines a memoized getter.
|
# Defines a memoized getter.
|
||||||
# The *name* is the name of the getter method.
|
# The *name* is the name of the getter method.
|
||||||
# The block is evaluated only on the first time the getter is used
|
# The block is evaluated only on the first time the getter is used
|
|
@ -13,8 +13,8 @@ class SpectatorTestContext < SpectatorContext
|
||||||
include ::Spectator::DSL::Groups
|
include ::Spectator::DSL::Groups
|
||||||
include ::Spectator::DSL::Hooks
|
include ::Spectator::DSL::Hooks
|
||||||
include ::Spectator::DSL::Matchers
|
include ::Spectator::DSL::Matchers
|
||||||
|
include ::Spectator::DSL::Memoize
|
||||||
include ::Spectator::DSL::Mocks
|
include ::Spectator::DSL::Mocks
|
||||||
include ::Spectator::DSL::Values
|
|
||||||
|
|
||||||
@subject = ::Spectator::LazyWrapper.new
|
@subject = ::Spectator::LazyWrapper.new
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue