How to test a wrapper method
I am writing a ruby application that loads rake files and runs specific
tasks. I have created a class that inherits from Rake::Application. I have
the following method:
class RakeEnv < Rake::Application
# Make our app the singleton application while we load tasks
def load_imports
old_app = Rake.application
Rake.application = self
super
Rake.application = old_app
end
end
How would I go about testing the load_imports method? By the way, I am
using rspec.
No comments:
Post a Comment