Created
June 18, 2010 07:32
-
-
Save MichaelXavier/443367 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
class MyDir < Dir | |
class << self | |
def [](args) | |
super(args).collect {|entry| do_junk(entry)} | |
end | |
end | |
end | |
describe MyDir | |
before do | |
Dir.stub(:[]).and_return(%w(file1 file2)) | |
end | |
it do | |
MyDir['*'].should # undefine method [] for MyDir | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment