File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 42
42
f . write ( cache_file_content )
43
43
end
44
44
45
- allow ( ::RuboCop ::ConfigLoader ) . to ( receive ( :load_file ) . and_call_original )
46
- allow ( ::RuboCop ::ConfigLoader ) . to ( receive ( :read_file ) . and_return ( rubocop_yml ) )
45
+ digest_sha1_double = instance_double ( Digest ::SHA1 )
46
+ allow ( Digest ::SHA1 ) . to ( receive ( :new ) . and_return ( digest_sha1_double ) )
47
+ allow ( digest_sha1_double ) . to ( receive ( :hexdigest ) . and_return ( checksum ) )
48
+ allow ( digest_sha1_double ) . to ( receive ( :update ) . and_return ( true ) )
49
+ allow ( digest_sha1_double ) . to ( receive ( :file ) . and_return ( true ) )
47
50
end
48
51
49
52
describe "#get" do
127
130
) ) . to ( be ( true ) )
128
131
end
129
132
130
- it "prunes outdated cache results" do
133
+ it "prunes unused cache results" do
131
134
fakefs_dir = Struct . new ( :fakefs_dir )
132
135
allow ( fakefs_dir ) . to ( receive ( :children ) . and_return ( [ checksum , "fake-checksum" ] ) )
133
136
allow ( FakeFS ::Dir ) . to ( receive ( :new ) . and_return ( fakefs_dir ) )
You can’t perform that action at this time.
0 commit comments