Merge branch 'named-subject-fix' into 'master'

Named subject fix

See merge request arctic-fox/spectator!3
This commit is contained in:
Mike Miller 2019-05-21 19:48:30 +00:00
commit ed2614da22
2 changed files with 3 additions and 3 deletions

View file

@ -1,5 +1,5 @@
name: spectator
version: 0.7.0
version: 0.7.1
description: |
A feature-rich spec testing framework for Crystal with similarities to RSpec.

View file

@ -781,8 +781,8 @@ module Spectator::DSL
# It is cached so that the same instance is used throughout the test.
# The subject will be recreated for each test it is used in.
macro subject(name, &block)
subject {{block}}
let({{name.id}}) { subject }
let({{name.id}}) {{block}}
subject { {{name.id}} }
end
# Defines an expression by name.