A website template with lots of features, built with ruby on rails.

blog_steps.rb 749B

12345678910111213141516171819202122232425262728293031
  1. Info.create( :website_name => 'Website', :tagline => 'A Ruby on Rails app template', :default_language => 'en' )
  2. Given /^the following (.+) list ?$/ do |factory, table|
  3. table.hashes.each do |hash|
  4. FactoryGirl.create(factory, hash)
  5. end
  6. end
  7. Given /^I have blog posts titled (.+)$/ do |titles|
  8. titles.split(', ').each do |title|
  9. BlogPost.create!(:title => title)
  10. end
  11. end
  12. When /^I go to (.+)$/ do |page_name|
  13. path_to(page_name)
  14. end
  15. Then(/^I should see "(.*?)"$/) do |arg1|
  16. page.should have_content(arg1)
  17. end
  18. Then(/^I should see "(.*?)" And I should see "(.*?)"$/) do |arg1, arg2|
  19. page.should have_content(arg1)
  20. page.should have_content(arg2)
  21. end
  22. When(/^I click in the link "(.*?)"$/) do |arg1|
  23. click_link arg1
  24. end