Skip to content

Instantly share code, notes, and snippets.

@brianc
Created December 4, 2009 20:17
Show Gist options
  • Save brianc/249323 to your computer and use it in GitHub Desktop.
Save brianc/249323 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'riot'
module Bang
def go
"yes"
end
end
class Boom
def go
"no"
end
end
class Boom
include Bang
end
context "Including a module" do
should "overwrite normal method" do
Boom.new.go
end.equals('yes')
end
# - should overwrite normal method: expected "yes", not "no"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment