summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2015-02-01 22:41:13 -0700
committermo khan <mo@mokhan.ca>2015-02-01 22:45:38 -0700
commitbbded5187a97464b610fe4ff305cfc3cf8af936b (patch)
treec5e9bb03dec32753f3b0946473ec9ce1b0749151
parenta035ea603b16e2f5c393e6b625566f1efadc5bca (diff)
hound happy.
-rw-r--r--config/application.rb17
-rw-r--r--spec/controllers/my/passwords_controller_spec.rb3
-rw-r--r--spec/features/change_password_spec.rb10
3 files changed, 16 insertions, 14 deletions
diff --git a/config/application.rb b/config/application.rb
index cd8b6fed..a1961900 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../boot', __FILE__)
+require File.expand_path("../boot", __FILE__)
# Pick the frameworks you want:
require "active_model/railtie"
@@ -11,7 +11,7 @@ require "sprockets/railtie"
# require "rails/test_unit/railtie"
# Require the gems listed in Gemfile, including any gems
-# you've limited to :test, :development, or :production.
+# you"ve limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module Cake
@@ -28,11 +28,12 @@ module Cake
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
- # config.time_zone = 'Central Time (US & Canada)'
+ # config.time_zone = "Central Time (US & Canada)"
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
- config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')]
+ # config.i18n.load_path += Dir[Rails.root.join("my", "locales", "*.{rb,yml}").to_s]
+ translations_path = Rails.root.join("config", "locales", "**", "*.{rb,yml}")
+ config.i18n.load_path += Dir[translations_path]
# config.i18n.default_locale = :de
# Do not swallow errors in after_commit/after_rollback callbacks.
@@ -47,9 +48,9 @@ module Cake
end
end
config.middleware.use ExceptionNotification::Rack, :email => {
- :email_prefix => "[Boom! #{Rails.env}] ",
- :sender_address => %{"notifier" <notifier@cakeside.com>},
- :exception_recipients => ENV['EXCEPTION_EMAIL_ADDRESS'].try(:split, " "),
+ email_prefix: "[Boom! #{Rails.env}] ",
+ sender_address: %{"notifier" <notifier@cakeside.com>},
+ exception_recipients: ENV["EXCEPTION_EMAIL_ADDRESS"].try(:split, " "),
} unless Rails.env.test?
config.middleware.use Rack::Attack
end
diff --git a/spec/controllers/my/passwords_controller_spec.rb b/spec/controllers/my/passwords_controller_spec.rb
index 776ef957..92262371 100644
--- a/spec/controllers/my/passwords_controller_spec.rb
+++ b/spec/controllers/my/passwords_controller_spec.rb
@@ -25,7 +25,8 @@ describe My::PasswordsController do
end
it "displays an error on the page" do
- expect(flash[:error]).to eql(I18n.t("my.passwords.passwords_do_not_match"))
+ error_message = I18n.t("my.passwords.passwords_do_not_match")
+ expect(flash[:error]).to eql(error_message)
end
it "renders the show template" do
diff --git a/spec/features/change_password_spec.rb b/spec/features/change_password_spec.rb
index 3c12e4f0..1ba10715 100644
--- a/spec/features/change_password_spec.rb
+++ b/spec/features/change_password_spec.rb
@@ -2,20 +2,20 @@ require "rails_helper"
describe "changing my password", js: true do
context "when changing my password" do
- let(:user) { create(:user, :password => "password") }
+ let(:user) { create(:user, password: "password") }
before :each do
visit login_path
within(".form-inline") do
- fill_in("session_username", :with => user.email)
- fill_in("session_password", :with => "password")
+ fill_in("session_username", with: user.email)
+ fill_in("session_password", with: "password")
end
click_button("Sign In")
visit my_dashboard_path
click_link("Account")
within(".form-horizontal") do
- fill_in("user_password", :with => "mopass")
- fill_in("user_password_confirmation", :with => "mopass")
+ fill_in("user_password", with: "mopass")
+ fill_in("user_password_confirmation", with: "mopass")
end
click_button "Update password"
end