Created
December 4, 2012 03:50
-
-
Save joannecheng/4200339 to your computer and use it in GitHub Desktop.
rspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe User do | |
describe "#initialize" | |
context 'with all parameters' do | |
it "works" do | |
user = User.new :first_name => "slkdfjlaskdf" | |
user.first_name.should == "" | |
user.last_name.should == "" | |
end | |
end | |
context 'without first name' do | |
it 'returns an error' do | |
# create a user without a first name | |
# test to see if an error returned | |
end | |
end | |
context 'without email' do | |
it 'returns an error' do | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment