Class: Graham::TestCase::Proxy
- Inherits:
- BasicObject
- Defined in:
- lib/graham/test_case.rb
Overview
Delegator to create test cases out of methods that would otherwise mistakenly be called on a DSL instance.
Instance Method Summary collapse
-
#initialize(dsl, obj) ⇒ Proxy
constructor
A new instance of Proxy.
- #method_missing(msg, *args, &blk) ⇒ Object
Constructor Details
#initialize(dsl, obj) ⇒ Proxy
Returns a new instance of Proxy.
16 17 18 |
# File 'lib/graham/test_case.rb', line 16 def initialize(dsl,obj) @dsl,@obj=dsl,obj end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(msg, *args, &blk) ⇒ Object
20 21 22 |
# File 'lib/graham/test_case.rb', line 20 def method_missing(msg,*args,&blk) @dsl.send :_case,@obj,msg,args,blk end |