Module: Gaku::Testing::FlashHelpers
- Defined in:
- lib/gaku/testing/flash_helpers.rb
Instance Method Summary collapse
- #flash?(text) ⇒ Boolean
- #flash_created? ⇒ Boolean
- #flash_destroyed? ⇒ Boolean
- #flash_error_for(field) ⇒ Object
- #flash_recovered? ⇒ Boolean
- #flash_updated? ⇒ Boolean
- #flash_uploaded? ⇒ Boolean
Instance Method Details
#flash?(text) ⇒ Boolean
3 4 5 |
# File 'lib/gaku/testing/flash_helpers.rb', line 3 def flash?(text) page.should have_selector('#notice', text: text) end |
#flash_created? ⇒ Boolean
7 8 9 |
# File 'lib/gaku/testing/flash_helpers.rb', line 7 def flash_created? flash? 'successfully created' end |
#flash_destroyed? ⇒ Boolean
15 16 17 |
# File 'lib/gaku/testing/flash_helpers.rb', line 15 def flash_destroyed? flash? 'successfully destroyed' end |
#flash_error_for(field) ⇒ Object
27 28 29 |
# File 'lib/gaku/testing/flash_helpers.rb', line 27 def flash_error_for(field) page.should have_selector("div.#{field}formError") end |
#flash_recovered? ⇒ Boolean
19 20 21 |
# File 'lib/gaku/testing/flash_helpers.rb', line 19 def flash_recovered? flash? 'successfully recovered' end |
#flash_updated? ⇒ Boolean
11 12 13 |
# File 'lib/gaku/testing/flash_helpers.rb', line 11 def flash_updated? flash? 'successfully updated' end |
#flash_uploaded? ⇒ Boolean
23 24 25 |
# File 'lib/gaku/testing/flash_helpers.rb', line 23 def flash_uploaded? flash? 'successfully uploaded' end |