8000 Test and development cleanups by BrianHawley · Pull Request #204 · wardencommunity/warden · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Test and development cleanups #204

8000
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [ '2.5', '2.6', '2.7', '3.0' ]
ruby: [ '2.5', '2.6', '2.7', '3.0', '3.1' ]
name: Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ pkg

*.gem
Gemfile.lock

.ruby-version
.ruby-gemset
6 changes: 6 additions & 0 deletions spec/warden/proxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,12 @@ def wrap_app(app, &blk)
::Warden.asset_paths = @asset_regex
end

around do |example|
asset_paths = ::Warden.asset_paths
example.run
::Warden.instance_variable_set(:@asset_paths, asset_paths)
end

it "should return true if PATH_INFO is in asset list" do
env = env_with_params('/assets/fun.gif')
setup_rack(success_app).call(env)
Expand Down
6 changes: 0 additions & 6 deletions spec/warden/test/helpers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,4 @@
setup_rack(app).call(env_with_params)
expect($captures).to eq([:run])
end

describe "#asset_paths" do
it "should default asset_paths to anything asset path regex" do
expect(Warden.asset_paths).to eq([/^\/assets\//] )
end
end
end
6 changes: 6 additions & 0 deletions spec/warden/test/test_mode_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,10 @@
expect($captures).to eq([])
end
end

describe "#asset_paths" do
it "should default asset_paths to anything asset path regex" do
expect(Warden.asset_paths).to eq([/^\/assets\//])
end
end
end
0