add very basic lorem test
This commit is contained in:
parent
6582a2f75a
commit
51a00c4174
5
features/helpers_lorem.feature
Normal file
5
features/helpers_lorem.feature
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Feature: Lorem generating helper
|
||||||
|
|
||||||
|
Scenario: Lorem Helper
|
||||||
|
Given the Server is running at "test-app"
|
||||||
|
Then going to "/lorem.html" should not raise an exception
|
|
@ -21,6 +21,7 @@ with_layout :content_for do
|
||||||
end
|
end
|
||||||
|
|
||||||
with_layout false do
|
with_layout false do
|
||||||
|
page "/lorem.html"
|
||||||
page "/markdown.html"
|
page "/markdown.html"
|
||||||
page "/relative_image.html"
|
page "/relative_image.html"
|
||||||
page "/inline-css.html"
|
page "/inline-css.html"
|
||||||
|
|
12
fixtures/test-app/source/lorem.html.erb
Normal file
12
fixtures/test-app/source/lorem.html.erb
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<%= lorem.word %>
|
||||||
|
<%= lorem.words(5) %>
|
||||||
|
<%= lorem.sentence %>
|
||||||
|
<%= lorem.sentences(2) %>
|
||||||
|
<%= lorem.paragraph %>
|
||||||
|
<%= lorem.paragraphs(2) %>
|
||||||
|
<%= lorem.date %>
|
||||||
|
<%= lorem.name %>
|
||||||
|
<%= lorem.first_name %>
|
||||||
|
<%= lorem.last_name %>
|
||||||
|
<%= lorem.email %>
|
||||||
|
<%= lorem.image(100) %>
|
|
@ -44,6 +44,10 @@ When /^I go to "([^\"]*)"$/ do |url|
|
||||||
@browser.get(url)
|
@browser.get(url)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Then /^going to "([^\"]*)" should not raise an exception$/ do |url|
|
||||||
|
lambda { @browser.get(url) }.should_not raise_exception
|
||||||
|
end
|
||||||
|
|
||||||
Then /^I should see "([^\"]*)"$/ do |expected|
|
Then /^I should see "([^\"]*)"$/ do |expected|
|
||||||
@browser.last_response.body.should include(expected)
|
@browser.last_response.body.should include(expected)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue