Module: Shoulda::Context

Defined in:
lib/shoulda/context/context.rb,
lib/shoulda/context/version.rb,
lib/shoulda/context/assertions.rb,
lib/shoulda/context/test_framework_detection.rb

Defined Under Namespace

Modules: Assertions, ClassMethods, InstanceMethods, TestFrameworkDetection Classes: Context

Constant Summary collapse

VERSION =
'1.2.2'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.contextsObject

:nodoc:



4
5
6
# File 'lib/shoulda/context/context.rb', line 4

def contexts # :nodoc:
  @contexts ||= []
end

Class Method Details

.add_context(context) ⇒ Object

:nodoc:



13
14
15
# File 'lib/shoulda/context/context.rb', line 13

def add_context(context) # :nodoc:
  self.contexts.push(context)
end

.current_contextObject

:nodoc:



9
10
11
# File 'lib/shoulda/context/context.rb', line 9

def current_context # :nodoc:
  self.contexts.last
end

.remove_contextObject

:nodoc:



17
18
19
# File 'lib/shoulda/context/context.rb', line 17

def remove_context # :nodoc:
  self.contexts.pop
end

.test_framework_test_casesObject



30
31
32
# File 'lib/shoulda/context/test_framework_detection.rb', line 30

def self.test_framework_test_cases
  TestFrameworkDetection.test_framework_test_cases
end