Module: Shoulda::Context::TestFrameworkDetection

### Home Classes Methods

### In Files

- lib/shoulda/context/test_framework_detection.rb

### Methods

- ::detected_test_framework_test_cases
- ::possible_test_frameworks
- ::resolve_framework
- ::test_framework_test_cases

### Class/Module Index

Quicksearch

- Shoulda
- Shoulda::Context
- Shoulda::Context::Assertions
- Shoulda::Context::ClassMethods
- Shoulda::Context::InstanceMethods
- Shoulda::Context::TestFrameworkDetection
- DuplicateTestError
- Object
- ShouldaContextLoadable

No matching classes.

# Shoulda::Context::TestFrameworkDetection

### Public Class Methods

detected_test_framework_test_cases() click to toggle source

    # File lib/shoulda/context/test_framework_detection.rb, line 19
    def self.detected_test_framework_test_cases
      possible_test_frameworks.
        map { |future_framework| resolve_framework(future_framework) }.
        compact
    end

possible_test_frameworks() click to toggle source

    # File lib/shoulda/context/test_framework_detection.rb, line 4
    def self.possible_test_frameworks
      [
        lambda { ActiveSupport::TestCase },
        lambda { Minitest::Test },
        lambda { MiniTest::Unit::TestCase },
        lambda { Test::Unit::TestCase }
      ]
    end

resolve_framework(future_framework) click to toggle source

    # File lib/shoulda/context/test_framework_detection.rb, line 13
    def self.resolve_framework(future_framework)
      future_framework.call
    rescue NameError
      nil
    end

test_framework_test_cases() click to toggle source

    # File lib/shoulda/context/test_framework_detection.rb, line 25
    def self.test_framework_test_cases
      @_test_framework_test_case ||= detected_test_framework_test_cases
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.