Skip to content

Instantly share code, notes, and snippets.

@joannecheng
Created December 4, 2012 03:50
Show Gist options
  • Save joannecheng/4200339 to your computer and use it in GitHub Desktop.
Save joannecheng/4200339 to your computer and use it in GitHub Desktop.
rspec
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