Module: Saharspec::Its::Block
- Defined in:
- lib/saharspec/its/block.rb
Instance Method Summary collapse
-
#its_block(*options, &block) ⇒ Object
Creates nested example that redefines implicit
is_expected
to use subject as a block.
Instance Method Details
#its_block(*options, &block) ⇒ Object
Creates nested example that redefines implicit is_expected
to use subject as a block.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/saharspec/its/block.rb', line 34 def its_block(*, &block) # rubocop:disable Lint/NestedMethodDefinition describe('as block') do # FIXME: Not necessary? (Previously, wrapped the subject in lambda, now just repeats it) let(:__call_subject) do subject end def is_expected expect { __call_subject } end example(nil, *, &block) end # rubocop:enable Lint/NestedMethodDefinition end |