[rspec-users] [Cucumber] Tabular data in steps

Erik Pukinskis erikpukinskis at gmail.com
Thu Jan 29 04:37:29 EST 2009


Yes, that should work.  But you'd have to do

Given /^there is a country "(.*)" with the cities:$/ do |country_name,
cities_table|
...
end

Erik

On Thu, Jan 29, 2009 at 12:47 AM, Juanma Cervera <lists at ruby-forum.com> wrote:
> Is it possible to mix a normal parameter argument for a step, with
> tabular data?
>
> Something like this:
>
> Given there is a country "Spain" with the cities:
>  |name      |
>  |Madrid    |
>  |Barcelona |
>  |Valencia  |
>
> And this step_definition
>
> Given /^there is a country "Spain" with the cities:$/ do |country_name,
> cities_table|
> ...
> end
>
> Thanks
> Juanma
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list