Skip to content

Instantly share code, notes, and snippets.

@phosphene
Created January 26, 2011 21:38
Show Gist options
  • Save phosphene/797526 to your computer and use it in GitHub Desktop.
Save phosphene/797526 to your computer and use it in GitHub Desktop.
require 'spec_helper'
module UserSpecHelper
def valid_user_attributes
{ 'email' => '[email protected]',
'username' => 'faustrolle',
'password' => 'abcdefg',
'zip_code' => '97221' }
end
end
describe User do
include UserSpecHelper
before do
@user = User.new
end
context "#save" do
specify "should save a user" do
@user.attributes = valid_user_attributes
@user.save
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment