Ruby Frank Cucumber:自定义类中的app_exec引发异常
我试图从launch_steps.rb文件中的自定义类中调用app_exec,但我一直遇到以下异常: MyJSON:Class(NoMethodError)的未定义方法“app\u exec”Ruby Frank Cucumber:自定义类中的app_exec引发异常,ruby,cucumber,frank,Ruby,Cucumber,Frank,我试图从launch_steps.rb文件中的自定义类中调用app_exec,但我一直遇到以下异常: MyJSON:Class(NoMethodError)的未定义方法“app\u exec” 问题在于,我包括而不是扩展: class MyJSON extend Frank::Cucumber::FrankHelper 我仍然不知道为什么我不能引用它而不扩展它。即使我尝试了以下方法,也不会奏效: class MyJSON include Frank::Cucumber::FrankHe
问题在于,我包括而不是扩展:
class MyJSON
extend Frank::Cucumber::FrankHelper
我仍然不知道为什么我不能引用它而不扩展它。即使我尝试了以下方法,也不会奏效:
class MyJSON
include Frank::Cucumber::FrankHelper
@json = nil
@flush = true;
def self.requestJson
@json=Frank::Cucumber::FrankHelper.app_exec( "getJsonMessages:", true ) #undefined method even with the inclusion of FrankHelper
if @json.count==0
@json = nil
raise "No Data Returned From Application"
end
end
class MyJSON
include Frank::Cucumber::FrankHelper
@json = nil
@flush = true;
def self.requestJson
@json=Frank::Cucumber::FrankHelper.app_exec( "getJsonMessages:", true ) #undefined method even with the inclusion of FrankHelper
if @json.count==0
@json = nil
raise "No Data Returned From Application"
end
end