diff --git a/config/locales/en.yml b/config/locales/rails.en.yml similarity index 100% rename from config/locales/en.yml rename to config/locales/rails.en.yml diff --git a/config/locales/es.yml b/config/locales/rails.es.yml similarity index 100% rename from config/locales/es.yml rename to config/locales/rails.es.yml diff --git a/spec/features/debates_spec.rb b/spec/features/debates_spec.rb index f0b5b346b..d2ac83705 100644 --- a/spec/features/debates_spec.rb +++ b/spec/features/debates_spec.rb @@ -36,9 +36,9 @@ feature 'Debates' do fill_in 'debate_description', with: 'Esto es un tema muy importante porque...' check 'debate_terms_of_service' - click_button 'Crear Debate' + click_button 'Create Debate' - expect(page).to have_content 'Debate creado correctamente' + expect(page).to have_content 'Debate was successfully created.' expect(page).to have_content 'Acabar con los desahucios' expect(page).to have_content 'Esto es un tema muy importante porque...' expect(page).to have_content "Por #{author.name}" @@ -75,9 +75,9 @@ feature 'Debates' do fill_in 'debate_title', with: 'Dimisión Rajoy' fill_in 'debate_description', with: 'Podríamos...' - click_button 'Actualizar Debate' + click_button 'Update Debate' - expect(page).to have_content 'Debate actualizado correctamente' + expect(page).to have_content 'Debate was successfully updated.' expect(page).to have_content 'Dimisión Rajoy' expect(page).to have_content 'Podríamos...' end diff --git a/spec/features/tags_spec.rb b/spec/features/tags_spec.rb index 27b2528bd..43f04b5f0 100644 --- a/spec/features/tags_spec.rb +++ b/spec/features/tags_spec.rb @@ -64,9 +64,9 @@ feature 'Tags' do fill_in 'debate_tag_list', with: "Impuestos, Economía, Hacienda" - click_button 'Crear Debate' + click_button 'Create Debate' - expect(page).to have_content 'Debate creado correctamente' + expect(page).to have_content 'Debate was successfully created.' expect(page).to have_content 'Economía, Hacienda, Impuestos' end @@ -79,9 +79,9 @@ feature 'Tags' do expect(page).to have_selector("input[value='Economía']") fill_in 'debate_tag_list', with: "Economía, Hacienda" - click_button 'Actualizar Debate' + click_button 'Update Debate' - expect(page).to have_content 'Debate actualizado correctamente' + expect(page).to have_content 'Debate was successfully updated.' within('.tags') do expect(page).to have_css('a', text: 'Economía') expect(page).to have_css('a', text: 'Hacienda') @@ -95,9 +95,9 @@ feature 'Tags' do visit edit_debate_path(debate) fill_in 'debate_tag_list', with: "" - click_button 'Actualizar Debate' + click_button 'Update Debate' - expect(page).to have_content 'Debate actualizado correctamente' + expect(page).to have_content 'Debate was successfully updated.' expect(page).to_not have_content 'Economía' end diff --git a/spec/features/users_spec.rb b/spec/features/users_spec.rb index e0fbb1edd..6f03544df 100644 --- a/spec/features/users_spec.rb +++ b/spec/features/users_spec.rb @@ -14,9 +14,9 @@ feature 'Users' do click_button 'Registrarse' - expect(page).to have_content '¡Bienvenido! Has sido identificado.' + expect(page).to have_content 'Welcome! You have signed up successfully.' end - + scenario 'Sign in' do user = create(:user, email: 'manuela@madrid.es', password: 'judgementday') @@ -25,18 +25,18 @@ feature 'Users' do fill_in 'user_email', with: 'manuela@madrid.es' fill_in 'user_password', with: 'judgementday' click_button 'Entrar' - - expect(page).to have_content 'Has iniciado sesión correctamente.' + + expect(page).to have_content 'Signed in successfully.' end scenario 'Sign out' do user = create(:user) login_as(user) - + visit "/" click_link 'Salir' - expect(page).to have_content 'Has cerrado la sesión correctamente.' + expect(page).to have_content 'Signed out successfully.' end end diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 2d2a80824..06687fa9e 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -8,6 +8,8 @@ require 'capybara/rails' require 'capybara/rspec' require 'capybara/poltergeist' +I18n.default_locale = :en + include Warden::Test::Helpers Warden.test_mode!