Class: Remarkable::Macros::PendingSandbox
- Inherits:
-
Struct
- Object
- Struct
- Remarkable::Macros::PendingSandbox
show all
- Includes:
- Remarkable::Macros
- Defined in:
- lib/remarkable/pending.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Remarkable::Macros
Instance Method Details
#example(mather_description = nil) ⇒ Object
Also known as:
it, specify
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/remarkable/pending.rb', line 13
def example(mather_description=nil)
method_caller = caller.detect{ |c| c !~ /method_missing'/ }
error = begin
::Spec::Example::ExamplePendingError.new(description || 'TODO', method_caller)
rescue ::Spec::Example::ExamplePendingError.new(description || 'TODO')
end
spec.send(:example, mather_description){ raise error }
end
|
#should_or_should_not_method_missing(should_or_should_not, method, calltrace, *args, &block) ⇒ Object
27
28
29
|
# File 'lib/remarkable/pending.rb', line 27
def should_or_should_not_method_missing(should_or_should_not, method, calltrace, *args, &block)
example(get_description_from_matcher(should_or_should_not, method, *args, &block))
end
|