Class: Funktional::ShouldNotSendEmailBlock
- Inherits:
-
ShouldBlock
- Object
- ShouldBlock
- Funktional::ShouldNotSendEmailBlock
- Defined in:
- lib/funktional/context/should_not_send_email_block.rb
Instance Method Summary collapse
-
#initialize(context) ⇒ ShouldNotSendEmailBlock
constructor
A new instance of ShouldNotSendEmailBlock.
Methods inherited from ShouldBlock
Constructor Details
#initialize(context) ⇒ ShouldNotSendEmailBlock
Returns a new instance of ShouldNotSendEmailBlock.
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/funktional/context/should_not_send_email_block.rb', line 4 def initialize(context) @context = context @should_name = "not send an email" @before = lambda { @before_setup_count = ActionMailer::Base.deliveries.size } where = test_and_line_no @blk = lambda do expected_count = @before_setup_count current = ActionMailer::Base.deliveries.size assert_equal expected_count, current, "New [Email] was sent." end end |