Skip to content

Commit

Permalink
Remove no longer needed spec setup
Browse files Browse the repository at this point in the history
  • Loading branch information
landongrindheim committed Jul 15, 2019
1 parent f2cd1ff commit a68bd2c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 25 deletions.
5 changes: 0 additions & 5 deletions spec/warden/hooks_spec.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# encoding: utf-8
# frozen_string_literal: true
RSpec.describe "standard authentication hooks" do

before(:all) do
load_strategies
end

describe "after_set_user" do
before(:each) do
RAM = Warden::Manager unless defined?(RAM)
Expand Down
18 changes: 0 additions & 18 deletions spec/warden/manager_spec.rb
Original file line number Diff line number Diff line change
@@ -1,31 +1,13 @@
# encoding: utf-8
# frozen_string_literal: true
RSpec.describe Warden::Manager do

before(:all) do
load_strategies
end

it "should insert a Proxy object into the rack env" do
env = env_with_params
setup_rack(success_app).call(env)
expect(env["warden"]).to be_an_instance_of(Warden::Proxy)
end

describe "thrown auth" do
before(:each) do
@basic_app = lambda{|env| [200,{'Content-Type' => 'text/plain'},'OK']}
@authd_app = lambda do |e|
if e['warden'].authenticated?
[200,{'Content-Type' => 'text/plain'},"OK"]
else
[401,{'Content-Type' => 'text/plain'},"Fail From The App"]
end
end
@env = Rack::MockRequest.
env_for('/', 'HTTP_VERSION' => '1.1', 'REQUEST_METHOD' => 'GET')
end # before(:each)

describe "Failure" do
it "should respond with a 401 response if the strategy fails authentication" do
env = env_with_params("/", :foo => "bar")
Expand Down
2 changes: 0 additions & 2 deletions spec/warden/proxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -885,8 +885,6 @@ def def_app(&blk)

describe "dynamic default_strategies" do
before(:all) do
load_strategies

class ::DynamicDefaultStrategies
def initialize(app, &blk)
@app, @blk = app, blk
Expand Down

0 comments on commit a68bd2c

Please sign in to comment.