Cucumberの使用中にユーザーが作成されなかったことをどのように主張しますか?RSpecでは、次のブロックを使用しますが、これはCucumberに変換できません。
...
describe "with invalid information" do
it "should not create a new user" do
expect { click_button submit }.not_to change(User, :count)
end
end
# Cucumber equivalent
When /^he submits invalid information$/ do
click_button "Sign up"
end
Then /^an account should not be created$/ do
# not sure how to translate the expect block
end