際際滷

際際滷Share a Scribd company logo
RORO May Lightning Preso Madness
RORO May Lightning Preso Madness
RORO May Lightning Preso Madness
Cufon
Fast text replacement with canvas
and VML - no Flash or images
required.
RORO May Lightning Preso Madness
RORO May Lightning Preso Madness
<!DOCTYPE html PUBLIC quot;-//W3C//DTD XHTML 1.0 Strict//ENquot; quot;http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtdquot;>
<html>
  <head>
    <script src=/slideshow/roro-may-lightning-preso-madness/1394866/quot;cufon.jsquot; type=quot;text/javascriptquot;></script>
    <script src=quot;fontin.font.jsquot; type=quot;text/javascriptquot;></script>
    <script type=quot;text/javascriptquot;>
       Cufon.replace(quot;h1quot;);
    </script>
  </head>
  <body>
    <h1>Look mah, it's Fontin!</h1>
  </body>
</html>
RORO May Lightning Preso Madness
RORO May Lightning Preso Madness
VIEW-FIRST

Validations
RORO May Lightning Preso Madness
SIMPLIFYING

Cucumber Stories
RORO May Lightning Preso Madness
Feature: Administering school subscriptions


  In order to manage a school's textbook subscriptions
  As a super user
  I want to be add and remove textbooks from a school's subscriptions


  Scenario: index
    Given I am logged in as a super-user
    And a school quot;Gymea Techquot; exists
    When I go to the school admin book subscriptions for quot;Gymea Techquot;
    Then I see the page
Feature: Administering school subscriptions


  In order to manage a school's textbook subscriptions
  As a super user
  I want to be add and remove textbooks from a school's subscriptions


  Scenario: index
    Given I am logged in as a super-user
    And a school quot;Gymea Techquot; exists
   When I go to the school admin book subscriptions for quot;Gymea Techquot;
    Then I see the page
def path_to(page_name)                  when /^new school admin$/
  case page_name                          new_admin_school_path

  when /^the homepage$/                 when /^the school admin for quot;(.*)quot;$/
    root_path                             admin_school_path(school_with_name($1))

  when /^the books page$/               when /^the school admin book subscriptions for quot;(.*)quot;$/
    books_path                            admin_school_book_subscriptions_path(school_with_name($1))

  when /^the login page$/               when /^the admin school admins path for quot;(.*)quot;$/
    login_path                            admin_school_admins_path(school_with_name($1))

  when /^logout$/                       when /^the book homepage for quot;(.*)quot;$$/
    logout_path                           book_path(book_with_title($1))

  when /^the forgot password page$/     when /^the first article in quot;(.*)quot;$/
    new_forgot_password_path              book = book_with_title($1)
                                          book_article_path(book, book.articles.first)
  when /^the register page$/
    register_path                       when /^the text version of the first article in quot;(.*)quot;$/
                                          book = book_with_title($1)
  when /^the admin$/                      book_article_path(book, book.articles.first, quot;textquot;)
    admin_path
                                        when /^the image path quot;(.*)quot; for quot;(.*)quot;$/
  when /^the super-users admin$/         book_image_path(book_with_title($2), $1.split(quot;/quot;))
    admin_super_users_path
                                        else
  when /^the schools admin$/              raise quot;Mapping from quot;#{page_name}quot; to a path not definedquot;
    admin_schools_path                  end
                                      end
Feature: Feedback form

  Scenario: submitting feedback w/ an email address
    Given logged in
    When post /feedback with {:email => quot;bob@bob.comquot;}
    Then response 302 to /feedback/thanks?reply=true
    And contact@agencyrainford.com receives an email
When /^post ([^s]+) with ({.*})$/ do |path, params|
  post path, eval(params)
end
RORO May Lightning Preso Madness
TIM LUCAS
TWITTER.COM/TOOLMANTIM
TOOLMANTIM.COM

More Related Content

RORO May Lightning Preso Madness

  • 4. Cufon Fast text replacement with canvas and VML - no Flash or images required.
  • 7. <!DOCTYPE html PUBLIC quot;-//W3C//DTD XHTML 1.0 Strict//ENquot; quot;http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtdquot;> <html> <head> <script src=/slideshow/roro-may-lightning-preso-madness/1394866/quot;cufon.jsquot; type=quot;text/javascriptquot;></script> <script src=quot;fontin.font.jsquot; type=quot;text/javascriptquot;></script> <script type=quot;text/javascriptquot;> Cufon.replace(quot;h1quot;); </script> </head> <body> <h1>Look mah, it's Fontin!</h1> </body> </html>
  • 14. Feature: Administering school subscriptions In order to manage a school's textbook subscriptions As a super user I want to be add and remove textbooks from a school's subscriptions Scenario: index Given I am logged in as a super-user And a school quot;Gymea Techquot; exists When I go to the school admin book subscriptions for quot;Gymea Techquot; Then I see the page
  • 15. Feature: Administering school subscriptions In order to manage a school's textbook subscriptions As a super user I want to be add and remove textbooks from a school's subscriptions Scenario: index Given I am logged in as a super-user And a school quot;Gymea Techquot; exists When I go to the school admin book subscriptions for quot;Gymea Techquot; Then I see the page
  • 16. def path_to(page_name) when /^new school admin$/ case page_name new_admin_school_path when /^the homepage$/ when /^the school admin for quot;(.*)quot;$/ root_path admin_school_path(school_with_name($1)) when /^the books page$/ when /^the school admin book subscriptions for quot;(.*)quot;$/ books_path admin_school_book_subscriptions_path(school_with_name($1)) when /^the login page$/ when /^the admin school admins path for quot;(.*)quot;$/ login_path admin_school_admins_path(school_with_name($1)) when /^logout$/ when /^the book homepage for quot;(.*)quot;$$/ logout_path book_path(book_with_title($1)) when /^the forgot password page$/ when /^the first article in quot;(.*)quot;$/ new_forgot_password_path book = book_with_title($1) book_article_path(book, book.articles.first) when /^the register page$/ register_path when /^the text version of the first article in quot;(.*)quot;$/ book = book_with_title($1) when /^the admin$/ book_article_path(book, book.articles.first, quot;textquot;) admin_path when /^the image path quot;(.*)quot; for quot;(.*)quot;$/ when /^the super-users admin$/ book_image_path(book_with_title($2), $1.split(quot;/quot;)) admin_super_users_path else when /^the schools admin$/ raise quot;Mapping from quot;#{page_name}quot; to a path not definedquot; admin_schools_path end end
  • 17. Feature: Feedback form Scenario: submitting feedback w/ an email address Given logged in When post /feedback with {:email => quot;bob@bob.comquot;} Then response 302 to /feedback/thanks?reply=true And contact@agencyrainford.com receives an email
  • 18. When /^post ([^s]+) with ({.*})$/ do |path, params| post path, eval(params) end