Skip to content

Commit

Permalink
Reset Warden after each spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Senen committed Jan 7, 2018
1 parent 35fbaa5 commit 4843bd8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 0 additions & 2 deletions spec/features/users/passwords_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

describe "Passwords" do

before { Warden.test_reset! }

describe "New" do

let!(:user) { create(:user) }
Expand Down
2 changes: 0 additions & 2 deletions spec/features/users/sessions_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
feature 'Sessions', :devise do

after { Warden.test_reset! }

describe 'Create' do

scenario 'user cannot sign in if not registered' do
Expand Down
5 changes: 4 additions & 1 deletion spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,8 @@
# The different available types are documented in the features, such as in
# https://relishapp.com/rspec/rspec-rails/docs
config.infer_spec_type_from_file_location!
end

config.after :each do
Warden.test_reset!
end
end

0 comments on commit 4843bd8

Please sign in to comment.