MA
Size: a a a
MA
R
MA
И
MA
database_cleaner
однако rake spec
постоянно выдает такую ошибку MA
И
И
MA
MA
MA
MA
require "rails_helper"
feature "Account creation" do
before(:all) do
sign_up
end
scenario "allows guest to create account" do
expect(page).to have_content I18n.t 'devise.registrations.signed_up'
end
end
MA
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.strategy = :transaction
DatabaseCleaner.clean_with(:truncation)
end
config.around(:each) do |example|
DatabaseCleaner.cleaning do
example.run
end
end
end
MA
def sign_up
visit new_user_registration_path
fill_in :user_email, with: 'user1234@example.com'
fill_in :user_username, with: 'userrrrr'
fill_in :user_password, with: 'user12345'
fill_in :user_password_confirmation, with: 'user12345'
click_button 'Sign up'
end
И
И
И
MA
MA
И