Skip to content
This repository
tag: v2.0.0.beta.18
Fetching contributors…

Cannot retrieve contributors at this time

file 35 lines (29 sloc) 0.697 kb
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 34 35
require 'active_support/concern'
require 'test/unit/assertions'

module RSpec
  module Rails
    module SetupAndTeardownAdapter
      extend ActiveSupport::Concern

      module ClassMethods
        def setup(*methods)
          methods.each {|method| before { send method } }
        end

        def teardown(*methods)
          methods.each {|method| after { send method } }
        end
      end
    end

    module TestUnitAssertionAdapter
      extend ActiveSupport::Concern
      def method_name
        @example
      end

      include Test::Unit::Assertions

      included do
        before do
          @_result = Struct.new(:add_assertion).new
        end
      end
    end
  end
end
Something went wrong with that request. Please try again.