我\xc2\xb4m 正在学习 Ruby on Rails,并且 i\xc2\xb4m 正在开发一个使用 stripe 创建高级帐户的应用程序。此外,i\xc2\xb4m 使用 Rspec 和 Capybara 进行集成测试。
\n\nrequire \'spec_helper\'\n\nfeature "user upgrade account to a premium plan" do\n scenario "user upgrade account", :js => true do\n user = FactoryGirl.create :user\n visit new_user_session_path\n fill_in \'Email\', :with => user.email\n fill_in \'Password\', :with => user.password\n click_button \'Sign in\'\n\n visit new_charge_path\n click_button "Pay with Card"\n\n fill_in \'Email\', :with => \'persona@example.com\'\n fill_in "Card number", :with => "4242424242424242"\n fill_in \'CVC\', :with => \'123\'\n fill_in \'MM/YY\', :with => \'11/14\'\n\n click_button …Run Code Online (Sandbox Code Playgroud)