Skip to content

Commit

Permalink
clean up per rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
npauzenga committed Jan 7, 2016
1 parent 6e96352 commit 3b488c1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions spec/interactors/send_password_reset_email_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
subject(:send_email) do
described_class.call(user: user)
end
before do

before do
ActionMailer::Base.deliveries.clear
end

Expand Down Expand Up @@ -41,8 +41,10 @@
end

context "when user does not have a valid reset_digest" do
let(:user) { create(:confirmed_user, reset_digest: nil,
reset_token: token[1]) }
let(:user) do
create(:confirmed_user, reset_digest: nil,
reset_token: token[1])
end

it "fails" do
is_expected.to be_a_failure
Expand All @@ -54,8 +56,10 @@
end

context "when user does not have a valid reset_token" do
let(:user) { create(:confirmed_user, reset_digest: token[0],
reset_token: nil) }
let(:user) do
create(:confirmed_user, reset_digest: token[0],
reset_token: nil)
end

it "fails" do
is_expected.to be_a_failure
Expand Down
2 changes: 1 addition & 1 deletion spec/mailers/user_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
let(:user) { create(:confirmed_user, reset_token: token[1]) }

let(:mail) do
UserMailer.password_reset(user: user)
described_class.password_reset(user: user)
end

it "renders the subject" do
Expand Down

0 comments on commit 3b488c1

Please sign in to comment.