@@ -18,7 +18,15 @@ def test_should_return_blob_contents(self, git):
1818 blob = Blob (self .repo , ** {'id' : 'abc' })
1919 assert_equal ("Hello world" , blob .data )
2020 assert_true (git .called )
21- assert_equal (git .call_args , (('cat_file' , 'abc' ), {'p' : True }))
21+ assert_equal (git .call_args , (('cat_file' , 'abc' ), {'p' : True , 'with_raw_output' : True }))
22+
23+ @patch (Git , '_call_process' )
24+ def test_should_return_blob_contents_with_newline (self , git ):
25+ git .return_value = fixture ('cat_file_blob_nl' )
26+ blob = Blob (self .repo , ** {'id' : 'abc' })
27+ assert_equal ("Hello world\n " , blob .data )
28+ assert_true (git .called )
29+ assert_equal (git .call_args , (('cat_file' , 'abc' ), {'p' : True , 'with_raw_output' : True }))
2230
2331 @patch (Git , '_call_process' )
2432 def test_should_cache_data (self , git ):
@@ -28,7 +36,7 @@ def test_should_cache_data(self, git):
2836 blob .data
2937 assert_true (git .called )
3038 assert_equal (git .call_count , 1 )
31- assert_equal (git .call_args , (('cat_file' , 'abc' ), {'p' : True }))
39+ assert_equal (git .call_args , (('cat_file' , 'abc' ), {'p' : True , 'with_raw_output' : True }))
3240
3341 @patch (Git , '_call_process' )
3442 def test_should_return_file_size (self , git ):
0 commit comments