Assertion using cucumber/ruby

I want to assert something only when I say that there is an error
mentioned in my cucumber table
using the following
Then /^the module level error must be “([^”]*)"$/ do
|moduleLevelMessage|
if !(moduleLevelMessage==’’ )
assert_equal( moduleLevelMessage,
packages_payments_page.flights_payments_service_module_level_error_widget.module_error)
end
end

My table is as followed
| Expected Page | moduleLevelMessage | pageLevelMessage |
| Main page | Welcome | Please try a different card.
|
| Main page | | Contact your card
issuer |

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs