Sha256: 182d57d96b11e4cba5c773550f872f47f206790a65ba374ee3a40888120505b8
Contents?: true
Size: 398 Bytes
Versions: 1
Compression:
Stored size: 398 Bytes
Contents
# frozen_string_literal: true RSpec::Matchers.define(:permit) do |env| description do method = env["REQUEST_METHOD"] credentials = Rails::Auth.credentials(env) message = "allow #{method}s by " return message << "unauthenticated clients" if credentials.count.zero? message << credentials.values.map(&:inspect).join(", ") end match { |acl| acl.match(env) } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails-auth-2.2.0 | lib/rails/auth/rspec/matchers/acl_matchers.rb |