diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index a214aeb..483b6c6 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -20,7 +20,7 @@ require 'rspec/rails' # directory. Alternatively, in the individual `*_spec.rb` files, manually # require only the support files necessary. # -# Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f } +Dir[Rails.root.join('../support/**/*.rb')].each { |f| require f } # Checks for pending migrations and applies them before tests are run. # If you are not using ActiveRecord, you can remove this line. diff --git a/spec/support/rspec_matchers.rb b/spec/support/rspec_matchers.rb new file mode 100644 index 0000000..b5a96bb --- /dev/null +++ b/spec/support/rspec_matchers.rb @@ -0,0 +1,11 @@ +module ActionDispatch + module Integration + module RequestHelpers + %w[copy move mkcol propfind proppatch lock unlock].each do |method| + define_method method do |path, **args| + process method.to_sym, path, **args + end + end + end + end +end