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
-
.contexts ⇒ Object
:nodoc:.
Class Method Summary collapse
-
.add_context(context) ⇒ Object
:nodoc:.
-
.current_context ⇒ Object
:nodoc:.
-
.remove_context ⇒ Object
:nodoc:.
- .test_framework_test_cases ⇒ Object
Class Attribute Details
.contexts ⇒ Object
: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_context ⇒ Object
:nodoc:
9 10 11 |
# File 'lib/shoulda/context/context.rb', line 9 def current_context # :nodoc: self.contexts.last end |
.remove_context ⇒ Object
:nodoc:
17 18 19 |
# File 'lib/shoulda/context/context.rb', line 17 def remove_context # :nodoc: self.contexts.pop end |
.test_framework_test_cases ⇒ Object
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 |