lib/rspectacular/plugins/authentication.rb in rspectacular-0.70.5 vs lib/rspectacular/plugins/authentication.rb in rspectacular-0.70.6

- old
+ new

@@ -1,7 +1,7 @@ RSpec.configure do |config| - config.around(:each, mock_auth: ->(v) { !!v }) do |example| + config.around(:each, :mock_auth => lambda { |v| !!v }) do |example| options = example.metadata[:mock_auth] authentication_type = if options.is_a?(Hash) && options[:type] options[:type] else @@ -103,9 +103,9 @@ end instance.delete unless options.is_a?(Hash) && options[:strategy] == :instance end - config.before(:each, mock_auth: ->(v) { !!v }) do |_example| + config.before(:each, :mock_auth => lambda { |v| !!v }) do |_example| request.env['X_DECRYPTED_JSON_WEB_TOKEN'] = @token_data end end