mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Merge branch 'master' of gitlab.com:arctic-fox/spectator
This commit is contained in:
commit
12c71a25cd
7 changed files with 23 additions and 6 deletions
|
@ -47,6 +47,11 @@ module Spectator
|
|||
end
|
||||
end
|
||||
|
||||
# ditto
|
||||
macro context(what, &block)
|
||||
describe({{what}}) {{block}}
|
||||
end
|
||||
|
||||
# Flag indicating whether Spectator should automatically run tests.
|
||||
# This should be left alone (set to true) in typical usage.
|
||||
# There are times when Spectator shouldn't run tests.
|
||||
|
|
|
@ -1272,7 +1272,7 @@ module Spectator::DSL
|
|||
# pre_condition { expect(array.size).to eq(3) } # 2
|
||||
# ```
|
||||
#
|
||||
# With nested groups, the inner blocks will run first.
|
||||
# With nested groups, the outer blocks will run first.
|
||||
# ```
|
||||
# describe Something do
|
||||
# pre_condition { is_expected.to_not be_nil } # 1
|
||||
|
@ -1499,6 +1499,18 @@ module Spectator::DSL
|
|||
peding({{block.body.stringify}}) {{block}}
|
||||
end
|
||||
|
||||
# Same as `#pending`.
|
||||
# Included for compatibility with RSpec.
|
||||
macro skip(what, &block)
|
||||
pending({{what}}) {{block}}
|
||||
end
|
||||
|
||||
# Same as `#pending`.
|
||||
# Included for compatibility with RSpec.
|
||||
macro skip(&block)
|
||||
pending({{block.body.stringify}}) {{block}}
|
||||
end
|
||||
|
||||
# Same as `#pending`.
|
||||
# Included for compatibility with RSpec.
|
||||
macro xit(what, &block)
|
||||
|
|
|
@ -21,7 +21,7 @@ module Spectator::Matchers
|
|||
|
||||
# Produces a stringified value.
|
||||
def to_s(io)
|
||||
io << value
|
||||
@value.inspect(io)
|
||||
end
|
||||
|
||||
# Produces a stringified value with additional information.
|
||||
|
|
|
@ -12,7 +12,7 @@ module Spectator::Matchers
|
|||
|
||||
# Stringifies the value.
|
||||
def to_s(io)
|
||||
io << @value
|
||||
@value.inspect(io)
|
||||
end
|
||||
|
||||
# Inspects the value.
|
||||
|
|
|
@ -21,7 +21,7 @@ module Spectator::Matchers
|
|||
# The string will be prefixed with "Not" when negated.
|
||||
def to_s(io)
|
||||
io << "Not " if @negated
|
||||
io << @value
|
||||
@value.inspect(io)
|
||||
end
|
||||
|
||||
# Produces a stringified value with additional information.
|
||||
|
|
|
@ -26,7 +26,7 @@ module Spectator::Matchers
|
|||
def to_s(io)
|
||||
io << prefix
|
||||
io << ' '
|
||||
io << @value
|
||||
@value.inspect(io)
|
||||
end
|
||||
|
||||
# Produces a stringified value with additional information.
|
||||
|
|
|
@ -14,7 +14,7 @@ module Spectator::Matchers
|
|||
def to_s(io)
|
||||
io << @prefix
|
||||
io << ' '
|
||||
io << @value
|
||||
@value.inspect(io)
|
||||
end
|
||||
|
||||
# Outputs details of the formatted value with a prefix.
|
||||
|
|
Loading…
Reference in a new issue