diff --git a/features/helpers_lorem.feature b/features/helpers_lorem.feature new file mode 100644 index 00000000..7cca187c --- /dev/null +++ b/features/helpers_lorem.feature @@ -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 \ No newline at end of file diff --git a/fixtures/test-app/config.rb b/fixtures/test-app/config.rb index ba01ed9e..f421d8db 100644 --- a/fixtures/test-app/config.rb +++ b/fixtures/test-app/config.rb @@ -21,6 +21,7 @@ with_layout :content_for do end with_layout false do + page "/lorem.html" page "/markdown.html" page "/relative_image.html" page "/inline-css.html" diff --git a/fixtures/test-app/source/lorem.html.erb b/fixtures/test-app/source/lorem.html.erb new file mode 100644 index 00000000..bda62f21 --- /dev/null +++ b/fixtures/test-app/source/lorem.html.erb @@ -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) %> \ No newline at end of file diff --git a/lib/middleman/step_definitions/server_steps.rb b/lib/middleman/step_definitions/server_steps.rb index 189b0733..0c31102c 100644 --- a/lib/middleman/step_definitions/server_steps.rb +++ b/lib/middleman/step_definitions/server_steps.rb @@ -44,6 +44,10 @@ When /^I go to "([^\"]*)"$/ do |url| @browser.get(url) 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| @browser.last_response.body.should include(expected) end