Module: StackableFlash::TestHelpers
- Included in:
- RspecMatchers
- Defined in:
- lib/stackable_flash/test_helpers.rb
Instance Method Summary collapse
-
#flash_in_stack(slash_for_status, expecting) ⇒ Object
slash is shorthand for stackable_flash.
Instance Method Details
#flash_in_stack(slash_for_status, expecting) ⇒ Object
slash is shorthand for stackable_flash
5 6 7 8 9 10 11 12 13 |
# File 'lib/stackable_flash/test_helpers.rb', line 5 def flash_in_stack(slash_for_status, expecting) return true if slash_for_status == expecting if slash_for_status.kind_of?(Array) matches = slash_for_status.select do |to_check| to_check == expecting end return matches.length > 0 end end |