Discussion:
[Cucumber] [cucumber][ruby] Unable to access class method using the class object in the step definitions
(too old to reply)
Kruthi
2018-03-13 00:47:38 UTC
Permalink
Raw Message
Hi,

I have created a module which has class and some methods. When I include
the module using the World feature of Cucumber, Im not able to access the
methods. How do I go about extending the visibility/scope of the
object/methods?

module ABC
class DEF
def self.obj2
....

def initialize
....

def class_method
...

end
end

@obj1 = ABC::DEF.obj2
World(ABC)

In my step definitions, I have tried to access the class method in this way:

@obj1.class_method()

But the method is not invoked.

What am I doing wrong? Any suggestions on accessing the methods from the
step definitions??

Thanks,
Kruthi
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...