2010-09-06 21:48:25 -04:00
|
|
|
Feature: Built-in macro view helpers
|
|
|
|
In order to simplify generating HTML
|
|
|
|
|
2012-03-04 20:20:57 -05:00
|
|
|
Scenario: Using the padrino helpers
|
2011-12-29 18:09:51 -05:00
|
|
|
Given the Server is running at "padrino-helpers-app"
|
2011-11-18 16:38:18 -05:00
|
|
|
When I go to "/former_padrino_test.html"
|
2010-09-06 21:48:25 -04:00
|
|
|
And I should see 'href="test2.com"'
|
|
|
|
And I should see 'src="/images/test2.png"'
|
2012-06-23 20:19:24 -04:00
|
|
|
And I should see 'src="/images/100px.png"'
|
2012-03-04 20:20:57 -05:00
|
|
|
And I should see 'src="/javascripts/test1.js"'
|
|
|
|
And I should see 'href="/stylesheets/test1.css"'
|
|
|
|
And I should see '1 KB'
|
2012-06-23 20:19:24 -04:00
|
|
|
|
|
|
|
Scenario: Setting http_prefix
|
|
|
|
Given a fixture app "padrino-helpers-app"
|
|
|
|
And a file named "config.rb" with:
|
|
|
|
"""
|
|
|
|
set :http_prefix, "/foo"
|
|
|
|
"""
|
|
|
|
And the Server is running at "padrino-helpers-app"
|
|
|
|
When I go to "/former_padrino_test.html"
|
|
|
|
And I should see 'src="/foo/images/test2.png"'
|
|
|
|
And I should see 'src="/foo/images/100px.png"'
|
|
|
|
And I should see 'src="/foo/javascripts/test1.js"'
|
|
|
|
And I should see 'href="/foo/stylesheets/test1.css"'
|
|
|
|
|
2012-03-04 20:20:57 -05:00
|
|
|
|