开发者

Rails: Making Settingslogic work with Cucumber

I can't seem to run Cucumber tests on views that include strings governed by Settingslogic.

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."

How can I add Settingslogic to my test environment so t开发者_高级运维his will pass?

I've tried:

config/environments/test.rb

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

config/environments/cucumber.rb

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

features/support/env.rb

require 'settingslogic'


In your app/config/application.yml do you have a cucumber section? If not, add this:

cucumber:
    <<: *defaults
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜