2013-04-23 39 views
0

我设置了弗兰克,并已完成大部分设置。我试图运行内置的黄瓜测试,只需旋转设备。弗兰克安装完成,但黄瓜测试不工作

我做cucumber -d而在MyProject/Frank/并获得这样的:

cucumber -d 
Feature: 
    As an iOS developer 
    I want to have a sample feature file 
    So I can see what my next step is in the wonderful world of Frank/Cucumber testing 

    Scenario:            # features/my_first.feature:6 
     Rotating the simulator for demonstration purposes 
    Given I launch the app        # features/step_definitions/launch_steps.rb:5 
    Given the device is in landscape orientation  # features/my_first.feature:9 
    Given the device is in portrait orientation   # features/my_first.feature:10 
    Given the device is in landscape orientation  # features/my_first.feature:11 
    Given the device is in portrait orientation   # features/my_first.feature:12 

1 scenario (1 skipped) 
5 steps (1 skipped, 4 undefined) 
0m0.002s 

You can implement step definitions for undefined steps with these snippets: 

Given(/^the device is in landscape orientation$/) do 
    pending # express the regexp above with the code you wish you had 
end 

Given(/^the device is in portrait orientation$/) do 
    pending # express the regexp above with the code you wish you had 
end 

只是困惑,并希望我调整设定了权利。感谢任何答案。

+0

你可以发布功能文件吗? – 2013-04-23 20:07:29

回答

0

我想通了一点前。我跑cucumber -d做一个“干运行”而不是像一个应该有的cucumber。当我运行cucumber时,一切正常。

1

要使用预定义的弗兰克步骤,你应该在你的“launch_steps.rb”文件,该文件通常位于下初下面一行“yourAppWorkspace /弗兰克/功能/ step_definitions”:

require 'frank-cucumber/core_frank_steps.rb' 

然后,如果您在features目录下运行“cucumber”,则步骤应该正确运行。

您还可以看到这里所有的预定义的步骤:https://github.com/moredip/Frank/blob/master/gem/lib/frank-cucumber/core_frank_steps.rb