Created
July 16, 2013 12:12
-
-
Save marcusleemitchell/6008154 to your computer and use it in GitHub Desktop.
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
Given /^the "([^"]*)" "([^"]*)" method responds slowly$/ do |test_controller, test_action| | |
test_controller.constantize.class_eval do | |
alias_method :old_index, :index | |
def index | |
if request.xhr? | |
puts "** I IZ IN UR CLAZ, SLEEPN UR METURD **" | |
sleep(5) | |
end | |
old_index | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment