Skip to content

Instantly share code, notes, and snippets.

@iHiD
Last active December 27, 2015 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iHiD/7263235 to your computer and use it in GitHub Desktop.
Save iHiD/7263235 to your computer and use it in GitHub Desktop.
# DON'T call this _test.rb as you don't want it to run
module AbstractTest
def test_the_abstract_thing
klass.do_something
assert something, klass.something
end
end
# This is a test and inherits the others tests.
class UserDocumentTest < Minitest::Test
include AbstractTest
protected
def klass
UserDocument
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment