Skip to content

Instantly share code, notes, and snippets.

@tonini
Last active December 24, 2015 14:59
Show Gist options
  • Save tonini/6816560 to your computer and use it in GitHub Desktop.
Save tonini/6816560 to your computer and use it in GitHub Desktop.
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
@blowmage
Copy link

blowmage commented Oct 3, 2013

You should remove ActiveSupport::TestCase.describe before you extend MiniTest::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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment