Create user signup form

This commit creates a user signup form and the absolute minimum
necessary framework necessary to get a test for filling it out and
submitting it to work correctly.  Unfortunately, for a simple task, it
takes a full model and two controller actions to work in addition to
one view template that both actions point to.  Not a big deal for a
seasoned rails worker, but a lot for the first-timer.
Initial User model tests

Some basic tests in the User model to check for fields that should be
a part of any user.
Add user to DB

This commit ensures that a user is added to the database when the new
user form is submitted.  We also display that new user when created.
No proper error checking is being done at this time, but should be
added in the next set of tests and updates.
Test User model for attribute presence

We test that the User model expects the presence of the username and
email attributes.  In order to write good tests, we have also imported
FactoryGirl to make our lives easier and created a simple factory for
a user.
Pass User attribute presence tests.

We can now pass the tests that check for username and password on our
User model.
Check for long usernames.

We don't want ridiculous usernames and so put in a test for one that
we expect to fail validations.
Pass long username test.

Added a validation to the User model to prevent long usernames.
Test for email addresses to be validated properly.

We check to ensure our email address validation regular expression
will catch some good examples of invalid emails and also some
difficult to pass examples of valid emails to ensure we aren't being
too loose, or too strict with our pattern.

NOTE: examples come directly from Michael Hartl's Rails tutorial.
Pass email formatting tests.

This commit adds a regular expression to the email validation
directive to ensure most valid email addresses are accepted and not
out invalid ones from getting through.
Test for duplicate usernames

We want to ensure that duplicate usernames are disallowed, but to pass
through any duplicate email addresses in case we want to have the same
address point to multiple accounts.  This requirement could always get
more strict and include only one account/email address, but it is so
easy to create a new email address, why bother?
Disallow duplicate usernames.

We add a validation in the User model and an index with a uniqueness
constraint both for username to prevent any two users being added to
the system with the same username.
Test authentication routines.

Ensure the user will properly authenticate users by accepting correct
passwords and rejecting invalid passwords for a given user.
Don't accept submissions for invalid users.

We add a test in the form submission that ensures the user model
validation is being called correctly.  We simply try submitting an
empty user for now.  This could get more robust, but the user model is
already checking those cases, so full duplication here seems silly.
We just want to make sure the web form doesn't bypass the validation
in some weird manner.
Test that individual users can be displayed.

We've added some simple tests that ensure the user can be displayed
properly.
Test that users index works correctly.

We want to be sure that we can list all of the users.  We need to
consider whether this listing is limited to anyone, logged in users,
administrators, etc.

The test also needs to be expanded to handle pagination correctly.
Fix up previous test.

After running test with viable candidates, I discovered two errors in
the test that needed to be fixed.  The first was that I was using let
inside a before(:all), which isn't allowed.  The second was that I
wasn't destroying the data created in the before(:all) because they
are created outside a transaction.  Both flaws fixed in this commit.
Pass user listing test.

This code can now successfully list all the users in the site.
Add tests for editing a user.

We check to see that a user can be edited.  Currently, we assume
anyone can edit a user, so tests that check for the correct user being
able to access the information are not included.  Those checks will
come later when we have sessions created.
Fix up User update tests.

The following fixes were necessary to have runnable tests.  Of course,
it was impossible to know this until I had existing code to exercise
the tests properly.  The missing edit action masked all these other
errors.
Pass User update tests.

These set of files both pass the update tests and slightly refactor
the new/edit form to be more DRY.