File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,15 +163,15 @@ describe Azu::Cache do
163163 stats.has_key?(" memory_usage_mb" ).should be_true
164164 end
165165
166- it " supports get with block syntax" do
166+ it " supports fetch with block syntax" do
167167 store = Azu ::Cache ::MemoryStore .new
168168
169169 # First call should execute block
170- result = store.get( " get_block_key " , Time ::Span .new(minutes: 5 )) { " block_result" }
170+ result = store.fetch( " fetch_block_key " , Time ::Span .new(minutes: 5 )) { " block_result" }
171171 result.should eq(" block_result" )
172172
173173 # Second call should return cached value
174- result = store.get( " get_block_key " , Time ::Span .new(minutes: 5 )) { " new_block_result" }
174+ result = store.fetch( " fetch_block_key " , Time ::Span .new(minutes: 5 )) { " new_block_result" }
175175 result.should eq(" block_result" )
176176 end
177177 end
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ describe Azu::DevelopmentTools do
6161
6262 it " records entry with duration" do
6363 profiler = Azu ::DevelopmentTools ::Profiler .new(enabled: true )
64- profiler.profile(" test" ) { sleep 0.01 }
64+ profiler.profile(" test" ) { sleep 0.01 .seconds }
6565 profiler.entries.first.duration.total_milliseconds.should be >= 10
6666 end
6767
@@ -152,15 +152,15 @@ describe Azu::DevelopmentTools do
152152
153153 it " calculates total time" do
154154 profiler = Azu ::DevelopmentTools ::Profiler .new(enabled: true )
155- profiler.profile(" test" ) { sleep 0.01 }
155+ profiler.profile(" test" ) { sleep 0.01 .seconds }
156156
157157 stats = profiler.stats[" test" ]
158158 stats[" total_time_ms" ].should be >= 10
159159 end
160160
161161 it " calculates average time" do
162162 profiler = Azu ::DevelopmentTools ::Profiler .new(enabled: true )
163- 2 .times { profiler.profile(" test" ) { sleep 0.01 } }
163+ 2 .times { profiler.profile(" test" ) { sleep 0.01 .seconds } }
164164
165165 stats = profiler.stats[" test" ]
166166 stats[" avg_time_ms" ].should be >= 10
You can’t perform that action at this time.
0 commit comments