@@ -95,14 +95,14 @@ module Pod
95
95
96
96
it 'saves the cache after computing the creation date of a set' do
97
97
@stats . creation_date ( @set )
98
- cache_hash = YAML . load ( @cache_file . read )
98
+ cache_hash = YAMLHelper . load ( @cache_file . read )
99
99
cache_hash [ 'JSONKit' ] [ :creation_date ] . should == Time . parse ( '2011-09-12 10:49:04 +0200' )
100
100
end
101
101
102
102
it 'saves the cache after computing the creation date of many sets' do
103
103
sets = [ @set , @source . search_by_name ( 'libPusher' ) . first ]
104
104
@stats . creation_dates ( sets )
105
- cache_hash = YAML . load ( @cache_file . read )
105
+ cache_hash = YAMLHelper . load ( @cache_file . read )
106
106
cache_hash [ 'JSONKit' ] [ :creation_date ] . should == Time . parse ( '2011-09-12 10:49:04 +0200' )
107
107
cache_hash [ 'libPusher' ] [ :creation_date ] . should == Time . parse ( '2012-02-01 17:05:58 +0100' )
108
108
end
@@ -128,7 +128,7 @@ module Pod
128
128
129
129
it 'saves the cache after retrieving GitHub information' do
130
130
@stats . github_watchers ( @set )
131
- saved_cache = YAML . load ( @cache_file . read )
131
+ saved_cache = YAMLHelper . load ( @cache_file . read )
132
132
saved_cache [ 'JSONKit' ] [ :gh_date ] = nil
133
133
@cache_hash [ 'JSONKit' ] [ :gh_date ] = nil
134
134
saved_cache . should == @cache_hash
@@ -141,7 +141,7 @@ module Pod
141
141
142
142
it 'stores in the cache time of the last access to the GitHub API' do
143
143
@stats . github_watchers ( @set )
144
- saved_cache = YAML . load ( @cache_file . read )
144
+ saved_cache = YAMLHelper . load ( @cache_file . read )
145
145
time_delta = ( Time . now - saved_cache [ 'JSONKit' ] [ :gh_date ] )
146
146
time_delta . should < 60
147
147
end
0 commit comments