2010-07-16 52 views
0

我用醃菜0.3.0與鐵軌,黃瓜和mongoid。我發現pickle0.3.0自動找到ORM。但是,當我寫了一個黃瓜場景並對其進行測試時,它沒有發現任何鹹菜步驟。

下面是示例:黃瓜,機械師和Mongoid泡菜

 
Scenario: logging in user 
    Given the following users exists 
    |name| 
    |John| 
    |white| 

,但沒有發現泡菜一步

 
# create models from a table 
Given(/^the following #{capture_plural_factory} exists?:?$/) do |plural_factory, table| 
    create_models_from_table(plural_factory, table) 
end 

,並生成該錯誤

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

Given /^the following users should exists$/ do |table| 
    # table is a Cucumber::Ast::Table 
    pending # express the regexp above with the code you wish you had 
end 

什麼想法?

+0

看看這個問題/答案,我正在使用mongo映射器,但你可能可以做類似於mongoid的事情。 http://stackoverflow.com/questions/3273184/how-do-i-get-cucumber-and-pickle-working-with-mongo-mapper-machinist-and-machin/3283915#3283915 – 2010-07-19 18:34:17

回答

1

使用泡菜後0.4。錯誤已解決。