fix failing tests
This commit is contained in:
parent
f6088e9abe
commit
f485f4ce57
4 changed files with 23 additions and 7 deletions
13
spec/support/flash.rb
Normal file
13
spec/support/flash.rb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
module Flash
|
||||
def flash
|
||||
results = all(:css, 'div#flash p')
|
||||
if results.empty?
|
||||
return 'none'
|
||||
end
|
||||
if results.count > 1
|
||||
texts = results.map { |r| r.text }
|
||||
fail "One flash expected, but we had #{texts.inspect}"
|
||||
end
|
||||
results.first.text
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue