Module: Saharspec::Its::Block
- Defined in:
- lib/saharspec/its/block.rb
Instance Method Summary collapse
-
#its_block(*options, &block) ⇒ Object
Creates nested example which converts current subject to a block-subject.
Instance Method Details
#its_block(*options, &block) ⇒ Object
Creates nested example which converts current subject to a block-subject.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/saharspec/its/block.rb', line 34 def its_block(*, &block) # rubocop:disable Lint/NestedMethodDefinition describe('as block') do let(:__call_subject) do -> { subject } end def is_expected expect(__call_subject) end example(nil, *, &block) end # rubocop:enable Lint/NestedMethodDefinition end |