Каков наилучший способ запуска сценария, который зависит от другого сценария?Как запустить сценарий перед другим сценарием в Rails Capybara test
scenario 'create a new category' do
index_page.open
index_page.click_new_category
modify_page.fill_form_with(category_params)
modify_page.submit
expect(index_page.flash).to have_css('.alert-success')
expect(index_page.entry(1)).to have_content(category_params[:name_de])
end
это «создать новую категорию» должно быть сделано до другого сценария «изменить категорию» может начать:
scenario 'edit category' do
index_page.open
index_page.click_new_category
modify_page.fill_form_with(category_params)
modify_page.submit
index_page.open
index_page.click_edit_category
modify_page.fill_form_with(category_params)
modify_page.submit
expect(index_page).to have_css('.alert-success')
end
Есть ли ярлык, чтобы устранить первые 4 строки в «категории редактирования» сценарий ?