views:

103

answers:

1

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 this 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'
+2  A: 

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

cucumber:
    <<: *defaults
jonnii
Awesome! Exactly what I was missing. Thanks!
neezer