Closed leecunliffe closed 6 years ago
Unsure how to write a spec for this? But with this, output of
rspec spec/rails/auth/rspec/matchers/acl_matchers_spec.rb
Changes from
RSpec ACL matchers
/baz/quux
example at ./spec/rails/auth/rspec/matchers/acl_matchers_spec.rb:16 (Got an error when generating description from matcher: NoMethodError: undefined method `values' for #<Rails::Auth::Credentials:0x007fe05e585020> -- /Users/leec/Development/rails-auth/lib/rails/auth/rspec/matchers/acl_matchers.rb:9:in `block (2 levels) in <top (required)>')
should not allow GETs by unauthenticated clients
example at ./spec/rails/auth/rspec/matchers/acl_matchers_spec.rb:17 (Got an error when generating description from matcher: NoMethodError: undefined method `values' for #<Rails::Auth::Credentials:0x007fe05e52dc30> -- /Users/leec/Development/rails-auth/lib/rails/auth/rspec/matchers/acl_matchers.rb:9:in `block (2 levels) in <top (required)>')
to:
RSpec ACL matchers
/baz/quux
should allow GETs by #<InstanceDouble(Rails::Auth::X509::Certificate) "OU=ponycopter">
should not allow GETs by #<InstanceDouble(Rails::Auth::X509::Certificate) "OU=derpderp">
should not allow GETs by unauthenticated clients
Should this PR include a version bump?
bumped bugfix version, updated the CHANGES.
The custom matcher calls
.values
on a Credentials object. This change means descriptions will print correctly for this custom matcher.