2013-04-23 5 views
0

Я настраиваю Фрэнк и проделал большую часть настройки. Я пытаюсь запустить встроенный тест огурца, который просто поворачивает устройство.Frank setup завершен, но тест на огурцы не работает

я 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

Можете ли вы опубликовать файл функции? –

ответ

0

Я понял это немного назад. Я побежал cucumber -d, делая «сухой ход», а не только cucumber, как должен. Когда я запускаю cucumber, все работает нормально.

1

Чтобы использовать предопределенные шаги Frank, вы должны включить следующую строку в начало файла «launch_steps.rb», который обычно находится под «yourAppWorkspace/Frank/функции/step_definitions»:

require 'frank-cucumber/core_frank_steps.rb' 

Затем, если вы запустите «огурец» в каталоге функций, ваши шаги должны выполняться правильно.

Вы также можете увидеть все предопределенные шаги здесь: https://github.com/moredip/Frank/blob/master/gem/lib/frank-cucumber/core_frank_steps.rb