-
Notifications
You must be signed in to change notification settings - Fork 865
/
Copy pathspec_helper.rb
33 lines (27 loc) · 938 Bytes
/
spec_helper.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
require 'rspec'
require 'view_helpers/view_example_group'
Dir[File.expand_path('../matchers/*_matcher.rb', __FILE__)].each { |matcher| require matcher }
RSpec::Matchers.alias_matcher :include_phrase, :include
RSpec.configure do |config|
config.include Module.new {
protected
def have_deprecation(msg)
output(/^DEPRECATION WARNING: #{Regexp.escape(msg)}/).to_stderr
end
def ignore_deprecation
if ActiveSupport::Deprecation.respond_to?(:silence)
ActiveSupport::Deprecation.silence { yield }
else
yield
end
end
}
config.mock_with :mocha
config.backtrace_exclusion_patterns << /view_example_group/
config.expose_dsl_globally = false
config.expect_with :rspec do |expectations|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end
config.shared_context_metadata_behavior = :apply_to_host_groups
config.disable_monkey_patching!
end