Skip to content

Instantly share code, notes, and snippets.

@lsegal
Created October 15, 2009 21:58
Show Gist options
  • Save lsegal/211324 to your computer and use it in GitHub Desktop.
Save lsegal/211324 to your computer and use it in GitHub Desktop.
module MyModule
class << self
def test
real_method
end
private
def real_method
"hi"
end
end
end
describe MyModule do
it "should call real_method" do
MyModule.should_receive(:real_method)
MyModule.test
end
it "should call real_method" do
MyModule.test
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment