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
if !(moduleLevelMessage==’’ )
assert_equal( moduleLevelMessage,

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