mirror of
https://github.com/varvet/pundit.git
synced 2022-11-09 12:30:11 -05:00
Fix tests on ActiveSupport v4.2.x
* Remove use of `Kernel#capture` to find RSpec deprecation warnings because it has has been deprecated. * Add `require "active_support"` to setup auto-loading. Closes #252.
This commit is contained in:
parent
ce62bc5cd1
commit
8ee11ef2fc
1 changed files with 3 additions and 12 deletions
|
@ -1,17 +1,8 @@
|
|||
require "active_support/core_ext/kernel"
|
||||
|
||||
warnings = capture(:stderr) do
|
||||
require "pundit"
|
||||
require "pundit/rspec"
|
||||
end
|
||||
|
||||
unless warnings.to_s.empty?
|
||||
puts "ERROR: Encountered deprecation warning!"
|
||||
puts warnings
|
||||
exit 1
|
||||
end
|
||||
require "pundit"
|
||||
require "pundit/rspec"
|
||||
|
||||
require "pry"
|
||||
require "active_support"
|
||||
require "active_support/core_ext"
|
||||
require "active_model/naming"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue