Last active
December 24, 2015 14:59
-
-
Save tonini/6816560 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class ActiveSupport::TestCase | |
class << self | |
remove_method :describe | |
alias :context :describe | |
end | |
extend MiniTest::Spec::DSL | |
end | |
class UserTest < ActiveSupport::TestCase | |
def setup | |
end | |
context '....' do | |
test '....' do | |
end | |
end | |
test '....' do | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should remove
ActiveSupport::TestCase.describe
before you extendMiniTest::Spec::DSL
, as you have done. But you need to do the alias after the extend to make sure you are aliasing the right method.I assume you are working off this post to enable the spec DSL in rails?