Skip to content

Instantly share code, notes, and snippets.

@traviskroberts
Created October 3, 2013 20:13
Show Gist options
  • Save traviskroberts/6816373 to your computer and use it in GitHub Desktop.
Save traviskroberts/6816373 to your computer and use it in GitHub Desktop.
describe 'it should regenerate the guid if one already exists' do
FactoryGirl.create(:user, guid: '123456')
SecureRandom.stub(:hex).and_return('123456', '456789')
user = User.new(email: 'john@email.com', total_budget: 250.00)
user.save
expect(user.reload.guid).to eq(6)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment