0

我似乎无法对包含由Settingslogic管理的字符串的视图运行 Cucumber 测试。

Scenario: Login as an existing user from homepage
    Given a user exists
    And I am on the home page
      can't convert nil into Hash (ActionView::TemplateError)
      On line #4 of app/views/home/index.html.haml

          1: #greeting
          2:   #lady= image_tag 'svg/lady.svg'
          3:   %h1= image_tag 'logo.png'
          4:   %p= "#{Settings.website.name} is still under development."

如何将 Settingslogic 添加到我的测试环境中以便通过?

我试过了:

配置/环境/test.rb

config.gem 'settingslogic', :lib => false

配置/环境/cucumber.rb

config.gem 'settingslogic', :lib => false

功能/支持/env.rb

require 'settingslogic'
4

1 回答 1

2

app/config/application.yml有黄瓜区吗?如果没有,请添加以下内容:

cucumber:
    <<: *defaults
于 2010-01-27T00:43:59.087 回答