summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2015-02-01 21:33:13 -0700
committermo khan <mo@mokhan.ca>2015-02-01 21:33:13 -0700
commit74fbea95e4f4a27e3e4fdc2b4e897b0316bd56f2 (patch)
tree085c60e575c148ad03791023d90bc37a3f10c2a8 /spec
parente5bd627538b428fe94f16ee430b4cdad085f10f2 (diff)
move translation out of devise.en.yml to en.yml
Diffstat (limited to 'spec')
-rw-r--r--spec/features/forgot_password_spec.rb5
-rw-r--r--spec/support/pages/dashboard_page.rb2
2 files changed, 5 insertions, 2 deletions
diff --git a/spec/features/forgot_password_spec.rb b/spec/features/forgot_password_spec.rb
index f394b1e9..a89b196f 100644
--- a/spec/features/forgot_password_spec.rb
+++ b/spec/features/forgot_password_spec.rb
@@ -3,6 +3,7 @@ require "rails_helper"
describe "password retrieval", :js => true do
context "when a user attempts to retrieve their password" do
let(:user) { create(:user) }
+ let(:error_message) { I18n.t('passwords.send_instructions') }
before :each do
visit login_path
@@ -13,8 +14,8 @@ describe "password retrieval", :js => true do
click_button "Send me reset password instructions"
end
- it "should send them an email with instructions" do
- expect(page).to have_content(I18n.t('devise.passwords.send_instructions'))
+ it "sends them an email with instructions" do
+ expect(page).to have_content(error_message)
end
end
diff --git a/spec/support/pages/dashboard_page.rb b/spec/support/pages/dashboard_page.rb
index bd7e9dbe..3fb2992e 100644
--- a/spec/support/pages/dashboard_page.rb
+++ b/spec/support/pages/dashboard_page.rb
@@ -1,3 +1,5 @@
+require_relative "../web_page.rb"
+
class DashboardPage < WebPage
def initialize
super(my_dashboard_path)