Merge branch 'master' of gitlab.com:arctic-fox/spectator

This commit is contained in:
Michael Miller 2019-04-05 23:53:55 -06:00
commit 12c71a25cd
7 changed files with 23 additions and 6 deletions

View file

@ -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.

View file

@ -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)

View file

@ -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.

View file

@ -12,7 +12,7 @@ module Spectator::Matchers
# Stringifies the value.
def to_s(io)
io << @value
@value.inspect(io)
end
# Inspects the value.

View file

@ -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.

View file

@ -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.

View file

@ -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.