Sha256: 7dead370ac37985a4ebeca1caf6dcb8674f754d0d0efc0b8fdf1298c5e3a6303

Contents?: true

Size: 707 Bytes

Versions: 8

Compression:

Stored size: 707 Bytes

Contents

require 'rack/test'
require 'cucumber'
require 'liquid'

require 'lookout/rack/test'
require 'lookout/rack/test/cucumber/transforms'
require 'lookout/rack/test/cucumber/general_steps'
require 'lookout/rack/test/cucumber/before'

require 'lookout/rack/test/cucumber/server'

module Lookout::Rack::Test
  module Cucumber
    include Lookout::Rack::Test::Cucumber::Server

    def render_string(buffer, opts={})
      ::Liquid::Template.parse(buffer).render(template_vars.merge(opts))
    end

    def template_vars
      @template_vars ||= {}
    end

    def current_locale
      I18n.locale = ENV['CUCUMBER_LOCALE'] || 'en'
    end
  end
end

World(Rack::Test::Methods)
World(Lookout::Rack::Test::Cucumber)

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
lookout-rack-test-2.3.0 lib/lookout/rack/test/cucumber.rb
lookout-rack-test-2.2.0 lib/lookout/rack/test/cucumber.rb
lookout-rack-test-2.1.0 lib/lookout/rack/test/cucumber.rb
lookout-rack-test-2.0.2 lib/lookout/rack/test/cucumber.rb
lookout-rack-test-2.0.1 lib/lookout/rack/test/cucumber.rb
lookout-rack-test-2.0.0 lib/lookout/rack/test/cucumber.rb
lookout-rack-test-1.3.0 lib/lookout/rack/test/cucumber.rb
lookout-rack-test-1.2.0 lib/lookout/rack/test/cucumber.rb