File: spec_helper.rb

package info (click to toggle)
ruby-email-spec 2.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 980 kB
  • sloc: ruby: 2,420; makefile: 3
file content (24 lines) | stat: -rw-r--r-- 692 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require 'rubygems'
require 'action_mailer'
require 'mail'
require File.expand_path(File.dirname(__FILE__) + '/../lib/email_spec.rb')

RSpec.configure do |config|
  config.include EmailSpec::Helpers
  config.include EmailSpec::Matchers

  config.mock_with :rspec
  config.raise_errors_for_deprecations!

  def matcher_failure_message(matcher)
    matcher.respond_to?(:failure_message_for_should) ?
        matcher.failure_message_for_should :
        matcher.failure_message
  end

  def matcher_failure_message_when_negated(matcher)
    matcher.respond_to?(:failure_message_for_should_not) ?
        matcher.failure_message_for_should_not :
        matcher.negative_failure_message
  end
end