git-trip 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. data.tar.gz.sig +2 -1
  2. data/History.txt +4 -0
  3. data/Manifest.txt +3 -56
  4. data/bin/git-trip +3 -0
  5. data/git-trip.gemspec +36 -0
  6. data/lib/git-trip.rb +3 -5
  7. data/lib/git-trip/errors.rb +1 -0
  8. data/lib/git-trip/gitter.rb +1 -0
  9. data/lib/git-trip/gitter/github.rb +68 -0
  10. data/lib/git-trip/gitter/uri.rb +27 -0
  11. data/spec/git-trip/errors_spec.rb +4 -0
  12. data/spec/git-trip/gitter/github_spec.rb +30 -0
  13. data/spec/git-trip/gitter/uri_spec.rb +4 -1
  14. data/spec/git-trip/gitter_spec.rb +8 -0
  15. metadata +5 -61
  16. metadata.gz.sig +0 -0
  17. data/vendor/grit/History.txt +0 -6
  18. data/vendor/grit/Manifest.txt +0 -53
  19. data/vendor/grit/README.txt +0 -213
  20. data/vendor/grit/Rakefile +0 -29
  21. data/vendor/grit/grit.gemspec +0 -16
  22. data/vendor/grit/lib/grit.rb +0 -37
  23. data/vendor/grit/lib/grit/actor.rb +0 -36
  24. data/vendor/grit/lib/grit/blob.rb +0 -117
  25. data/vendor/grit/lib/grit/commit.rb +0 -208
  26. data/vendor/grit/lib/grit/config.rb +0 -44
  27. data/vendor/grit/lib/grit/diff.rb +0 -70
  28. data/vendor/grit/lib/grit/errors.rb +0 -7
  29. data/vendor/grit/lib/grit/git.rb +0 -116
  30. data/vendor/grit/lib/grit/index.rb +0 -77
  31. data/vendor/grit/lib/grit/lazy.rb +0 -31
  32. data/vendor/grit/lib/grit/ref.rb +0 -110
  33. data/vendor/grit/lib/grit/repo.rb +0 -318
  34. data/vendor/grit/lib/grit/tree.rb +0 -99
  35. data/vendor/grit/test/fixtures/blame +0 -131
  36. data/vendor/grit/test/fixtures/cat_file_blob +0 -1
  37. data/vendor/grit/test/fixtures/cat_file_blob_size +0 -1
  38. data/vendor/grit/test/fixtures/diff_2 +0 -54
  39. data/vendor/grit/test/fixtures/diff_2f +0 -19
  40. data/vendor/grit/test/fixtures/diff_f +0 -15
  41. data/vendor/grit/test/fixtures/diff_i +0 -201
  42. data/vendor/grit/test/fixtures/diff_mode_only +0 -1152
  43. data/vendor/grit/test/fixtures/diff_new_mode +0 -17
  44. data/vendor/grit/test/fixtures/diff_p +0 -610
  45. data/vendor/grit/test/fixtures/for_each_ref +0 -0
  46. data/vendor/grit/test/fixtures/for_each_ref_remotes +0 -0
  47. data/vendor/grit/test/fixtures/for_each_ref_tags +0 -0
  48. data/vendor/grit/test/fixtures/ls_tree_a +0 -7
  49. data/vendor/grit/test/fixtures/ls_tree_b +0 -2
  50. data/vendor/grit/test/fixtures/ls_tree_commit +0 -3
  51. data/vendor/grit/test/fixtures/rev_list +0 -26
  52. data/vendor/grit/test/fixtures/rev_list_count +0 -655
  53. data/vendor/grit/test/fixtures/rev_list_single +0 -7
  54. data/vendor/grit/test/fixtures/rev_parse +0 -1
  55. data/vendor/grit/test/fixtures/show_empty_commit +0 -6
  56. data/vendor/grit/test/fixtures/simple_config +0 -2
  57. data/vendor/grit/test/helper.rb +0 -17
  58. data/vendor/grit/test/profile.rb +0 -21
  59. data/vendor/grit/test/suite.rb +0 -6
  60. data/vendor/grit/test/test_actor.rb +0 -35
  61. data/vendor/grit/test/test_blob.rb +0 -74
  62. data/vendor/grit/test/test_commit.rb +0 -182
  63. data/vendor/grit/test/test_config.rb +0 -58
  64. data/vendor/grit/test/test_diff.rb +0 -18
  65. data/vendor/grit/test/test_git.rb +0 -52
  66. data/vendor/grit/test/test_head.rb +0 -22
  67. data/vendor/grit/test/test_real.rb +0 -19
  68. data/vendor/grit/test/test_reality.rb +0 -17
  69. data/vendor/grit/test/test_remote.rb +0 -15
  70. data/vendor/grit/test/test_repo.rb +0 -278
  71. data/vendor/grit/test/test_tag.rb +0 -29
  72. data/vendor/grit/test/test_tree.rb +0 -91
@@ -1,7 +0,0 @@
1
- commit 4c8124ffcf4039d292442eeccabdeca5af5c5017
2
- tree 672eca9b7f9e09c22dcb128c283e8c3c8d7697a4
3
- parent 634396b2f541a9f2d58b00be1a07f0c358b999b3
4
- author Tom Preston-Werner <tom@mojombo.com> 1191999972 -0700
5
- committer Tom Preston-Werner <tom@mojombo.com> 1191999972 -0700
6
-
7
- implement Grit#heads
@@ -1 +0,0 @@
1
- 80f136f
@@ -1,6 +0,0 @@
1
- commit 1e3824339762bd48316fe87bfafc853732d43264
2
- tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
3
- author Tom Preston-Werner <tom@mojombo.com> 1157392833 +0000
4
- committer Tom Preston-Werner <tom@mojombo.com> 1157392833 +0000
5
-
6
- initial directory structure
@@ -1,2 +0,0 @@
1
- core.bare=false
2
- remote.origin.url=git://github.com/mojombo/grit.git
@@ -1,17 +0,0 @@
1
- require File.join(File.dirname(__FILE__), *%w[.. lib grit])
2
-
3
- require 'rubygems'
4
- require 'test/unit'
5
- require 'mocha'
6
-
7
- GRIT_REPO = File.join(File.dirname(__FILE__), *%w[..])
8
-
9
- include Grit
10
-
11
- def fixture(name)
12
- File.read(File.join(File.dirname(__FILE__), 'fixtures', name))
13
- end
14
-
15
- def absolute_project_path
16
- File.expand_path(File.join(File.dirname(__FILE__), '..'))
17
- end
@@ -1,21 +0,0 @@
1
- # require File.join(File.dirname(__FILE__), *%w[.. lib grit])
2
- # include Grit
3
- #
4
- # def recurse(tree, indent = "")
5
- # tree.contents.each do |c|
6
- # case c
7
- # when Tree
8
- # # puts "#{indent}#{c.name} (#{c.id})"
9
- # recurse(c, indent + " ")
10
- # end
11
- # end
12
- # end
13
- #
14
- # 10.times do
15
- # r = Repo.new("/Users/tom/dev/god")
16
- # t = r.tree
17
- #
18
- # recurse(t)
19
- # end
20
-
21
- 500.times { puts `git --git-dir /Users/tom/dev/god/.git ls-tree master` }
@@ -1,6 +0,0 @@
1
- require 'test/unit'
2
-
3
- tests = Dir["#{File.dirname(__FILE__)}/test_*.rb"]
4
- tests.each do |file|
5
- require file
6
- end
@@ -1,35 +0,0 @@
1
- require File.dirname(__FILE__) + '/helper'
2
-
3
- class TestActor < Test::Unit::TestCase
4
- def setup
5
-
6
- end
7
-
8
- # from_string
9
-
10
- def test_from_string_should_separate_name_and_email
11
- a = Actor.from_string("Tom Werner <tom@example.com>")
12
- assert_equal "Tom Werner", a.name
13
- assert_equal "tom@example.com", a.email
14
- end
15
-
16
- def test_from_string_should_handle_just_name
17
- a = Actor.from_string("Tom Werner")
18
- assert_equal "Tom Werner", a.name
19
- assert_equal nil, a.email
20
- end
21
-
22
- # inspect
23
-
24
- def test_inspect
25
- a = Actor.from_string("Tom Werner <tom@example.com>")
26
- assert_equal %Q{#<Grit::Actor "Tom Werner <tom@example.com>">}, a.inspect
27
- end
28
-
29
- # to_s
30
-
31
- def test_to_s_should_alias_name
32
- a = Actor.from_string("Tom Werner <tom@example.com>")
33
- assert_equal a.name, a.to_s
34
- end
35
- end
@@ -1,74 +0,0 @@
1
- require File.dirname(__FILE__) + '/helper'
2
-
3
- class TestBlob < Test::Unit::TestCase
4
- def setup
5
- @r = Repo.new(GRIT_REPO)
6
- @b = Blob.allocate
7
- end
8
-
9
- # blob
10
-
11
- def test_data_should_return_blob_contents
12
- Git.any_instance.expects(:cat_file).returns(fixture('cat_file_blob'))
13
- blob = Blob.create(@r, :id => 'abc')
14
- assert_equal "Hello world", blob.data
15
- end
16
-
17
- def test_data_should_cache
18
- Git.any_instance.expects(:cat_file).returns(fixture('cat_file_blob')).times(1)
19
- blob = Blob.create(@r, :id => 'abc')
20
- blob.data
21
- blob.data
22
- end
23
-
24
- # size
25
-
26
- def test_size_should_return_file_size
27
- Git.any_instance.expects(:cat_file).returns(fixture('cat_file_blob_size'))
28
- blob = Blob.create(@r, :id => 'abc')
29
- assert_equal 11, blob.size
30
- end
31
-
32
- # data
33
-
34
- # mime_type
35
-
36
- def test_mime_type_should_return_mime_type_for_known_types
37
- blob = Blob.create(@r, :id => 'abc', :name => 'foo.png')
38
- assert_equal "image/png", blob.mime_type
39
- end
40
-
41
- def test_mime_type_should_return_text_plain_for_unknown_types
42
- blob = Blob.create(@r, :id => 'abc')
43
- assert_equal "text/plain", blob.mime_type
44
- end
45
-
46
- # blame
47
-
48
- def test_blame
49
- Git.any_instance.expects(:blame).returns(fixture('blame'))
50
- b = Blob.blame(@r, 'master', 'lib/grit.rb')
51
- assert_equal 13, b.size
52
- assert_equal 25, b.inject(0) { |acc, x| acc + x.last.size }
53
- assert_equal b[0].first.object_id, b[9].first.object_id
54
- c = b.first.first
55
- c.expects(:__bake__).times(0)
56
- assert_equal '634396b2f541a9f2d58b00be1a07f0c358b999b3', c.id
57
- assert_equal 'Tom Preston-Werner', c.author.name
58
- assert_equal 'tom@mojombo.com', c.author.email
59
- assert_equal Time.at(1191997100), c.authored_date
60
- assert_equal 'Tom Preston-Werner', c.committer.name
61
- assert_equal 'tom@mojombo.com', c.committer.email
62
- assert_equal Time.at(1191997100), c.committed_date
63
- assert_equal 'initial grit setup', c.message
64
- # c.expects(:__bake__).times(1)
65
- # assert_equal Tree, c.tree.class
66
- end
67
-
68
- # inspect
69
-
70
- def test_inspect
71
- @b = Blob.create(@r, :id => 'abc')
72
- assert_equal %Q{#<Grit::Blob "abc">}, @b.inspect
73
- end
74
- end
@@ -1,182 +0,0 @@
1
- require File.dirname(__FILE__) + '/helper'
2
-
3
- class TestCommit < Test::Unit::TestCase
4
- def setup
5
- @r = Repo.new(GRIT_REPO)
6
- end
7
-
8
- # __bake__
9
-
10
- def test_bake
11
- Git.any_instance.expects(:rev_list).returns(fixture('rev_list_single'))
12
- @c = Commit.create(@r, :id => '4c8124ffcf4039d292442eeccabdeca5af5c5017')
13
- @c.author # bake
14
-
15
- assert_equal "Tom Preston-Werner", @c.author.name
16
- assert_equal "tom@mojombo.com", @c.author.email
17
- end
18
-
19
- # short_name
20
-
21
- def test_id_abbrev
22
- Git.any_instance.expects(:rev_parse).returns(fixture('rev_parse'))
23
- assert_equal '80f136f', @r.commit('80f136f500dfdb8c3e8abf4ae716f875f0a1b57f').id_abbrev
24
- end
25
-
26
- # diff
27
-
28
- def test_diff
29
- # git diff --full-index 91169e1f5fa4de2eaea3f176461f5dc784796769 > test/fixtures/diff_p
30
-
31
- Git.any_instance.expects(:diff).with({:full_index => true}, 'master').returns(fixture('diff_p'))
32
- diffs = Commit.diff(@r, 'master')
33
-
34
- assert_equal 15, diffs.size
35
-
36
- assert_equal '.gitignore', diffs.first.a_path
37
- assert_equal '.gitignore', diffs.first.b_path
38
- assert_equal '4ebc8aea50e0a67e000ba29a30809d0a7b9b2666', diffs.first.a_commit.id
39
- assert_equal '2dd02534615434d88c51307beb0f0092f21fd103', diffs.first.b_commit.id
40
- assert_equal '100644', diffs.first.b_mode
41
- assert_equal false, diffs.first.new_file
42
- assert_equal false, diffs.first.deleted_file
43
- assert_equal "--- a/.gitignore\n+++ b/.gitignore\n@@ -1 +1,2 @@\n coverage\n+pkg", diffs.first.diff
44
-
45
- assert_equal 'lib/grit/actor.rb', diffs[5].a_path
46
- assert_equal nil, diffs[5].a_commit
47
- assert_equal 'f733bce6b57c0e5e353206e692b0e3105c2527f4', diffs[5].b_commit.id
48
- assert_equal true, diffs[5].new_file
49
- end
50
-
51
- def test_diff_with_two_commits
52
- # git diff --full-index 59ddc32 13d27d5 > test/fixtures/diff_2
53
- Git.any_instance.expects(:diff).with({:full_index => true}, '59ddc32', '13d27d5').returns(fixture('diff_2'))
54
- diffs = Commit.diff(@r, '59ddc32', '13d27d5')
55
-
56
- assert_equal 3, diffs.size
57
- assert_equal %w(lib/grit/commit.rb test/fixtures/show_empty_commit test/test_commit.rb), diffs.collect { |d| d.a_path }
58
- end
59
-
60
- def test_diff_with_files
61
- # git diff --full-index 59ddc32 -- lib > test/fixtures/diff_f
62
- Git.any_instance.expects(:diff).with({:full_index => true}, '59ddc32', '--', 'lib').returns(fixture('diff_f'))
63
- diffs = Commit.diff(@r, '59ddc32', %w(lib))
64
-
65
- assert_equal 1, diffs.size
66
- assert_equal 'lib/grit/diff.rb', diffs.first.a_path
67
- end
68
-
69
- def test_diff_with_two_commits_and_files
70
- # git diff --full-index 59ddc32 13d27d5 -- lib > test/fixtures/diff_2f
71
- Git.any_instance.expects(:diff).with({:full_index => true}, '59ddc32', '13d27d5', '--', 'lib').returns(fixture('diff_2f'))
72
- diffs = Commit.diff(@r, '59ddc32', '13d27d5', %w(lib))
73
-
74
- assert_equal 1, diffs.size
75
- assert_equal 'lib/grit/commit.rb', diffs.first.a_path
76
- end
77
-
78
- # diffs
79
- def test_diffs
80
- # git diff --full-index 91169e1f5fa4de2eaea3f176461f5dc784796769 > test/fixtures/diff_p
81
-
82
- Git.any_instance.expects(:diff).returns(fixture('diff_p'))
83
- @c = Commit.create(@r, :id => '91169e1f5fa4de2eaea3f176461f5dc784796769')
84
- diffs = @c.diffs
85
-
86
- assert_equal 15, diffs.size
87
-
88
- assert_equal '.gitignore', diffs.first.a_path
89
- assert_equal '.gitignore', diffs.first.b_path
90
- assert_equal '4ebc8aea50e0a67e000ba29a30809d0a7b9b2666', diffs.first.a_commit.id
91
- assert_equal '2dd02534615434d88c51307beb0f0092f21fd103', diffs.first.b_commit.id
92
- assert_equal '100644', diffs.first.b_mode
93
- assert_equal false, diffs.first.new_file
94
- assert_equal false, diffs.first.deleted_file
95
- assert_equal "--- a/.gitignore\n+++ b/.gitignore\n@@ -1 +1,2 @@\n coverage\n+pkg", diffs.first.diff
96
-
97
- assert_equal 'lib/grit/actor.rb', diffs[5].a_path
98
- assert_equal nil, diffs[5].a_commit
99
- assert_equal 'f733bce6b57c0e5e353206e692b0e3105c2527f4', diffs[5].b_commit.id
100
- assert_equal true, diffs[5].new_file
101
- end
102
-
103
- def test_diffs_on_initial_import
104
- # git show --full-index 634396b2f541a9f2d58b00be1a07f0c358b999b3 > test/fixtures/diff_i
105
-
106
- Git.any_instance.expects(:show).with({:full_index => true, :pretty => 'raw'}, '634396b2f541a9f2d58b00be1a07f0c358b999b3').returns(fixture('diff_i'))
107
- @c = Commit.create(@r, :id => '634396b2f541a9f2d58b00be1a07f0c358b999b3')
108
- diffs = @c.diffs
109
-
110
- assert_equal 10, diffs.size
111
-
112
- assert_equal 'History.txt', diffs.first.a_path
113
- assert_equal 'History.txt', diffs.first.b_path
114
- assert_equal nil, diffs.first.a_commit
115
- assert_equal nil, diffs.first.b_mode
116
- assert_equal '81d2c27608b352814cbe979a6acd678d30219678', diffs.first.b_commit.id
117
- assert_equal true, diffs.first.new_file
118
- assert_equal false, diffs.first.deleted_file
119
- assert_equal "--- /dev/null\n+++ b/History.txt\n@@ -0,0 +1,5 @@\n+== 1.0.0 / 2007-10-09\n+\n+* 1 major enhancement\n+ * Birthday!\n+", diffs.first.diff
120
-
121
-
122
- assert_equal 'lib/grit.rb', diffs[5].a_path
123
- assert_equal nil, diffs[5].a_commit
124
- assert_equal '32cec87d1e78946a827ddf6a8776be4d81dcf1d1', diffs[5].b_commit.id
125
- assert_equal true, diffs[5].new_file
126
- end
127
-
128
- def test_diffs_on_initial_import_with_empty_commit
129
- Git.any_instance.expects(:show).with(
130
- {:full_index => true, :pretty => 'raw'},
131
- '634396b2f541a9f2d58b00be1a07f0c358b999b3'
132
- ).returns(fixture('show_empty_commit'))
133
-
134
- @c = Commit.create(@r, :id => '634396b2f541a9f2d58b00be1a07f0c358b999b3')
135
- diffs = @c.diffs
136
-
137
- assert_equal [], diffs
138
- end
139
-
140
- def test_diffs_with_mode_only_change
141
- Git.any_instance.expects(:diff).returns(fixture('diff_mode_only'))
142
- @c = Commit.create(@r, :id => '91169e1f5fa4de2eaea3f176461f5dc784796769')
143
- diffs = @c.diffs
144
-
145
- assert_equal 23, diffs.size
146
- assert_equal '100644', diffs[0].a_mode
147
- assert_equal '100755', diffs[0].b_mode
148
- end
149
-
150
- # to_s
151
-
152
- def test_to_s
153
- @c = Commit.create(@r, :id => 'abc')
154
- assert_equal "abc", @c.to_s
155
- end
156
-
157
- # inspect
158
-
159
- def test_inspect
160
- @c = Commit.create(@r, :id => 'abc')
161
- assert_equal %Q{#<Grit::Commit "abc">}, @c.inspect
162
- end
163
-
164
- # to_hash
165
-
166
- def test_to_hash
167
- @c = Commit.create(@r, :id => '4c8124ffcf4039d292442eeccabdeca5af5c5017')
168
-
169
- expected = {
170
- 'parents' => ['id' => "634396b2f541a9f2d58b00be1a07f0c358b999b3"],
171
- 'committed_date' => "2007-10-10T00:06:12-07:00",
172
- 'tree' => "672eca9b7f9e09c22dcb128c283e8c3c8d7697a4",
173
- 'authored_date' => "2007-10-10T00:06:12-07:00",
174
- 'committer' => {'email' => "tom@mojombo.com", 'name' => "Tom Preston-Werner"},
175
- 'message' => "implement Grit#heads",
176
- 'author' => {'email' => "tom@mojombo.com", 'name' => "Tom Preston-Werner"},
177
- 'id' => "4c8124ffcf4039d292442eeccabdeca5af5c5017"
178
- }
179
-
180
- assert_equal expected, @c.to_hash
181
- end
182
- end
@@ -1,58 +0,0 @@
1
- require File.dirname(__FILE__) + '/helper'
2
-
3
- class TestConfig < Test::Unit::TestCase
4
- def setup
5
- @r = Repo.new(GRIT_REPO)
6
- end
7
-
8
- # data
9
-
10
- def test_bracketed_fetch
11
- Git.any_instance.expects(:config).returns(fixture('simple_config'))
12
-
13
- config = @r.config
14
-
15
- assert_equal "git://github.com/mojombo/grit.git", config["remote.origin.url"]
16
- end
17
-
18
- def test_bracketed_fetch_returns_nil
19
- Git.any_instance.expects(:config).returns(fixture('simple_config'))
20
-
21
- config = @r.config
22
-
23
- assert_equal nil, config["unknown"]
24
- end
25
-
26
- def test_fetch
27
- Git.any_instance.expects(:config).returns(fixture('simple_config'))
28
-
29
- config = @r.config
30
-
31
- assert_equal "false", config.fetch("core.bare")
32
- end
33
-
34
- def test_fetch_with_default
35
- Git.any_instance.expects(:config).returns(fixture('simple_config'))
36
-
37
- config = @r.config
38
-
39
- assert_equal "default", config.fetch("unknown", "default")
40
- end
41
-
42
- def test_fetch_without_default_raises
43
- Git.any_instance.expects(:config).returns(fixture('simple_config'))
44
-
45
- config = @r.config
46
-
47
- assert_raise(IndexError) do
48
- config.fetch("unknown")
49
- end
50
- end
51
-
52
- def test_set_value
53
- Git.any_instance.expects(:config).with({}, 'unknown', 'default')
54
-
55
- config = @r.config
56
- config["unknown"] = "default"
57
- end
58
- end
@@ -1,18 +0,0 @@
1
- require File.dirname(__FILE__) + '/helper'
2
-
3
- class TestDiff < Test::Unit::TestCase
4
- def setup
5
- @r = Repo.new(GRIT_REPO)
6
- end
7
-
8
- # list_from_string
9
-
10
- def test_list_from_string_new_mode
11
- output = fixture('diff_new_mode')
12
-
13
- diffs = Diff.list_from_string(@r, output)
14
- assert_equal 2, diffs.size
15
- assert_equal 10, diffs.first.diff.split("\n").size
16
- assert_equal nil, diffs.last.diff
17
- end
18
- end
@@ -1,52 +0,0 @@
1
- require File.dirname(__FILE__) + '/helper'
2
-
3
- class TestGit < Test::Unit::TestCase
4
- def setup
5
- @git = Git.new(File.join(File.dirname(__FILE__), *%w[..]))
6
- end
7
-
8
- def test_method_missing
9
- assert_match(/^git version [\w\.]*$/, @git.version)
10
- end
11
-
12
- def test_transform_options
13
- assert_equal ["-s"], @git.transform_options({:s => true})
14
- assert_equal ["-s '5'"], @git.transform_options({:s => 5})
15
-
16
- assert_equal ["--max-count"], @git.transform_options({:max_count => true})
17
- assert_equal ["--max-count='5'"], @git.transform_options({:max_count => 5})
18
-
19
- assert_equal ["-s", "-t"], @git.transform_options({:s => true, :t => true}).sort
20
- end
21
-
22
- def test_uses_custom_sh_method
23
- @git.expects(:sh)
24
- @git.something
25
- end
26
-
27
- def test_can_skip_timeout
28
- @git.expects(:wild_sh)
29
- @git.something(:timeout => false)
30
- end
31
-
32
- def test_raises_if_too_many_bytes
33
- @git.instance_variable_set(:@bytes_read, 6000000)
34
- assert_raises Grit::Git::GitTimeout do
35
- @git.something
36
- end
37
- end
38
-
39
- def test_raises_on_slow_shell
40
- Grit::Git.git_timeout = 0.5
41
- Open4.expects(:popen4).returns([ nil, nil, mock(:read => proc { sleep 1 }), nil ])
42
- assert_raises Grit::Git::GitTimeout do
43
- @git.something
44
- end
45
- end
46
-
47
- def test_works_fine_if_quick
48
- output = 'output'
49
- Open4.expects(:popen4).returns([ nil, nil, mock(:read => output), nil ])
50
- assert_equal output, @git.something
51
- end
52
- end