1
0
Fork 0
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:
Eduardo Gutierrez 2015-03-10 09:27:32 -04:00
parent ce62bc5cd1
commit 8ee11ef2fc

View file

@ -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"