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
function debugAccess(obj, prop, debugGet){ | |
var origValue = obj[prop]; | |
var newKey = "__debug_access_"+prop; | |
obj[newKey] = origValue; | |
Object.defineProperty(obj, prop, { | |
get: function () { | |
if (this !== obj && this.hasOwnProperty(newKey)) { | |
console.log("Inherited object gets its existing COPY of '", prop, "' in ", newKey); | |
return this[newKey]; |
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
it 'should do something' do | |
on_failure warn_that "@foo shouldn't be nil" do | |
@foo.should_not be_nil | |
end | |
end |