File: with_rr.rb

package info (click to toggle)
ruby-rspec-core 2.14.7-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,756 kB
  • ctags: 1,195
  • sloc: ruby: 12,708; makefile: 14
file content (27 lines) | stat: -rw-r--r-- 505 bytes parent folder | download | duplicates (2)
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
require 'rr'

RSpec.configuration.backtrace_clean_patterns.push(RR::Errors::BACKTRACE_IDENTIFIER)

module RSpec
  module Core
    module MockFrameworkAdapter

      def self.framework_name; :rr end

      include RR::Extensions::InstanceMethods

      def setup_mocks_for_rspec
        RR::Space.instance.reset
      end

      def verify_mocks_for_rspec
        RR::Space.instance.verify_doubles
      end

      def teardown_mocks_for_rspec
        RR::Space.instance.reset
      end

    end
  end
end