Sha256: 443890af0baaa438819bf62b6da2571482c2448e43cab616f53fb952bb543f1f
Contents?: true
Size: 481 Bytes
Versions: 16
Compression:
Stored size: 481 Bytes
Contents
Given /^a product named "([^\"]*)"$/ do |name| attributes = {name: name} attributes[:user_id] ||= @me.id if @me attributes[:area_ids] ||= [Area.last.id] if Area.any? @product = Product.where(name: name).first || Factory(:product, attributes) @product.reload end Then /^I should see the following products:$/ do |expected_table| rows = find('table').all('tr') table = rows.map { |r| r.all('th,td').map { |c| c.text.strip } } expected_table.diff!(table) end
Version data entries
16 entries across 16 versions & 1 rubygems