Class: Funktional::FlashedShouldBlock
- Inherits:
-
ShouldBlock
- Object
- ShouldBlock
- Funktional::FlashedShouldBlock
- Defined in:
- lib/funktional/context/flashed_should_block.rb
Instance Method Summary collapse
-
#initialize(recorder, context) ⇒ FlashedShouldBlock
constructor
A new instance of FlashedShouldBlock.
- #test_name_parts ⇒ Object
Methods inherited from ShouldBlock
Constructor Details
#initialize(recorder, context) ⇒ FlashedShouldBlock
Returns a new instance of FlashedShouldBlock.
4 5 6 7 8 9 10 11 |
# File 'lib/funktional/context/flashed_should_block.rb', line 4 def initialize(recorder, context) @recorder, @context = recorder, context @should_name = "flash[:#{@recorder.__target}]" @blk = lambda do flashed(recorder.__target).send(recorder.__meth(0)[:name], *recorder.__meth(0)[:args]) end end |
Instance Method Details
#test_name_parts ⇒ Object
13 14 15 |
# File 'lib/funktional/context/flashed_should_block.rb', line 13 def test_name_parts ["test:", "#{@context.full_name},", @should_name, "should be", "[#{@recorder.__meth(0)[:args]}]"] end |