Allow implicit subject to take arbitrary arguments

This allows easy construction of the subject when it has an initializer
with parameters.
This commit is contained in:
Michael Miller 2018-11-07 12:55:38 -07:00
parent 4e690e7906
commit 3abb48fe53

View file

@ -268,8 +268,8 @@ module Spectator::DSL
# Implicit subject definition.
# Simply creates a new instance of the described type.
def subject
described_class.new
def subject(*args)
described_class.new(*args)
end
{% end %}