Permalink
Browse files

Add rudimentary spec for User

  • Loading branch information...
1 parent e6b6635 commit 22a33c9c54548e3bb1f43995f8a2183d297ef5b8 @manveru manveru committed May 31, 2009
Showing with 11 additions and 0 deletions.
  1. +11 −0 test/user_spec.rb
View
@@ -0,0 +1,11 @@
+require "#{File.dirname(__FILE__)}/../lib/git_store"
+require 'pp'
+
+describe GitStore::User do
+ it 'should parse a user string' do
+ user = GitStore::User.parse('Mr. T <mr.t@a-team.us> 1234567890 -0600')
+ user.name.should == 'Mr. T'
+ user.email.should == 'mr.t@a-team.us'
+ user.time.should == Time.at(1234567890 - 2160000)
+ end
+end

0 comments on commit 22a33c9

Please sign in to comment.