Skip to content

Instantly share code, notes, and snippets.

@misfo
Created August 13, 2012 13:11
Show Gist options
  • Save misfo/3340587 to your computer and use it in GitHub Desktop.
Save misfo/3340587 to your computer and use it in GitHub Desktop.
testing module functions in Ruby
module Funcs
module_function
# functions ...
end
require 'minitest/autorun'
class FuncsTest < MiniTest::Unit::TestCase
# ensures none of the methods tested set or mutate instance variables
Funcs = ::Funcs.dup.freeze
# tests
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment