Skip to content

Commit

Permalink
replaced instance variable with let! per rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
npauzenga committed Jan 16, 2016
1 parent 7ead975 commit 2eaf318
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions spec/interactors/find_user_by_reset_token_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
let(:token) { Encryptor.generate_token }

context "when successful" do
before do
@user = create(:confirmed_user, reset_digest: token[0])
end
let!(:user) { create(:confirmed_user, reset_digest: token[0]) }

subject do
described_class.call(reset_token: token[1])
Expand All @@ -16,7 +14,7 @@
end

it "find the user" do
expect(subject.user).to eq(@user)
expect(subject.user).to eq(user)
end
end

Expand Down

0 comments on commit 2eaf318

Please sign in to comment.