-
-
Save mstroming/8ff0ea09d556a7f99e72 to your computer and use it in GitHub Desktop.
Ruby unit test to test the slow loading of a datastream (replace Model and test_pid with your model and pid)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe "load an object" do | |
it "should load within 5 seconds" do | |
start_time = Time.now | |
@object = Model.find("test_pid") | |
end_time = Time.now | |
(end_time - start_time).should <= 5 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment