mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add f-prefix variants of groups and examples
For instance: `fit` for `it "...", :focus`
This commit is contained in:
parent
2b27ea5a01
commit
21d14bd814
3 changed files with 22 additions and 0 deletions
|
@ -137,6 +137,12 @@ module Spectator::DSL
|
|||
|
||||
define_example :specify
|
||||
|
||||
define_example :fexample, focus: true
|
||||
|
||||
define_example :fit, focus: true
|
||||
|
||||
define_example :fspecify, focus: true
|
||||
|
||||
@[Deprecated("Behavior of pending blocks will change in Spectator v0.11.0. Use `skip` instead.")]
|
||||
define_pending_example :pending
|
||||
|
||||
|
|
|
@ -181,6 +181,12 @@ module Spectator::DSL
|
|||
|
||||
define_example_group :xcontext, skip: "Temporarily skipped with xcontext"
|
||||
|
||||
define_example_group :fexample_group, focus: true
|
||||
|
||||
define_example_group :fdescribe, focus: true
|
||||
|
||||
define_example_group :fcontext, focus: true
|
||||
|
||||
# Defines a new iterative example group.
|
||||
# This type of group duplicates its contents for each element in *collection*.
|
||||
#
|
||||
|
@ -197,6 +203,8 @@ module Spectator::DSL
|
|||
# :ditto:
|
||||
define_iterative_group :xsample, skip: "Temporarily skipped with xsample"
|
||||
|
||||
define_iterative_group :fsample, focus: true
|
||||
|
||||
# Defines a new iterative example group.
|
||||
# This type of group duplicates its contents for each element in *collection*.
|
||||
# This is the same as `#sample` except that the items are shuffled.
|
||||
|
@ -218,5 +226,10 @@ module Spectator::DSL
|
|||
define_iterative_group :xrandom_sample, skip: "Temporarily skipped with xrandom_sample" do |collection|
|
||||
collection.to_a.shuffle(::Spectator.random)
|
||||
end
|
||||
|
||||
# :ditto:
|
||||
define_iterative_group :frandom_sample, focus: true do |collection|
|
||||
collection.to_a.shuffle(::Spectator.random)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue