Skip to content

Instantly share code, notes, and snippets.

View practicingruby's full-sized avatar

Gregory Brown practicingruby

View GitHub Profile
class Blog
attr_reader :entries
attr_accessor :post_class
def initialize
@entries = []
end
def title
"Underwater Basketweaving"
class Blog
attr_reader :entries
attr_writer :post_maker
def initialize
@entries = []
end
def title
"Underwater Basketweaving"
@practicingruby
practicingruby / calc.rb
Created July 12, 2012 15:22
Code Golf RPN Calculator!
p((_=[gets.split,[],"+-**/"])[0].map{|__|__=~/[0-9\.]+/?_[1]<<__.to_f : _[2][__]?_[1]<<_[1].pop.send(__,_[1].pop):0}[0][0])

Signup

  • Users need to sign up to use our app because [purpose]. We don't want to scare users with a long form though, so we'll simply ask for the minimum information. In our case that's the name, email and a password.

  • We don't ask users to confirm the password because they can easily reset it using the Forgot Password? link.

  • All fields are required, so the user will not be signed up if they fail to provide any of the required information.

  • Emails are unique, so using an email that already exists also results in an error.

When a user signs up successfully, they will be sent to the dashboard. We will send them an email confirming the sign up.

test "A successful signup" do
  simulated_user.visit do
    sign_up(email: "guybush@threepwood.com",
            name:  "Guybush Threepwood",
            password: "ilikerootbeer")

 current_page.is("/dashboard")