NoMethodError when trying to access method defined in included module
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to access a method from a module in one of my spec helpers I include the module in the test helper module Support class RestHelper include Rest::Rest def create_rest_client_for_ifa # Call method from module create_rest_client(uname, pword) end end end But I keep getting a NoMethodError when I run my spec: Failure/Error: @rest_client = Support::RestHelper.create_rest_client_for_ifa NoMethodError: undefined method `create_rest_client' for Support::RestHelper:Class Here is my module code: module Rest module Rest . . def create_rest