Ruby on rails 如何使Cumber不从数据库中删除一条记录?
Cucumber在每次运行前清理测试数据库 但我有几个值应该总是在数据库中Ruby on rails 如何使Cumber不从数据库中删除一条记录?,ruby-on-rails,Ruby On Rails,Cucumber在每次运行前清理测试数据库 但我有几个值应该总是在数据库中 (“默认”值) 有没有办法告诉Cucumber不要删除某些值? 还是在每次运行之前创建mb 只需将其放在背景部分的给定块中即可 e、 g 希望这有帮助 Background: Given I have an item that exists Given /^I have and item that exists$/ do Item.create!(item_name: 'Name') end
(“默认”值) 有没有办法告诉Cucumber不要删除某些值?
还是在每次运行之前创建mb 只需将其放在背景部分的给定块中即可 e、 g 希望这有帮助
Background:
Given I have an item that exists
Given /^I have and item that exists$/ do
Item.create!(item_name: 'Name')
end