capybara define optional parameter
<pre><code> Given   Admin user with email and role:
</code></pre>

<p>and i wanna create same defintion with extra parametar </p>

<p>Given   Admin user with email and role and  drop table</p>

<p>try to write this fixture</p>

<pre><code>Given(/^Admin user with email and role(?: and drop table (.*)):$/) do |table, drop|
  add_location :drop_tables =&gt; drop || false
  table.hashes.each_with_index do |value, key|
    value[:"Postal Code"] ||= nil
    add_admin_user :role_name =&gt; value[:"Role"], :admin_email =&gt; value[:"Email"]
  end
  clear_memcache
end
</code></pre>

<p>so if parametar doesn't exist, would be false by default, but if we have in definition drop table, should be drop_tables =>true</p>

<pre><code>drop_tables =&gt; drop || false
</code></pre>