Add RSpec methods for WebDAV actions for request specs
This commit is contained in:
@@ -20,7 +20,7 @@ require 'rspec/rails'
|
|||||||
# directory. Alternatively, in the individual `*_spec.rb` files, manually
|
# directory. Alternatively, in the individual `*_spec.rb` files, manually
|
||||||
# require only the support files necessary.
|
# 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.
|
# Checks for pending migrations and applies them before tests are run.
|
||||||
# If you are not using ActiveRecord, you can remove this line.
|
# If you are not using ActiveRecord, you can remove this line.
|
||||||
|
|||||||
11
spec/support/rspec_matchers.rb
Normal file
11
spec/support/rspec_matchers.rb
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user