I\'m trying to write some tests (not for code coverage, but irrelevant here) in rspec for a ROR app and need to alias describe and it, at the least. I can alias describe jus
It looks like you want to use define_example_method. This is how RSpec defines the example group methods like it
and specify
which are all really just aliases of each other. Not sure if there's an approved API for tapping into it, but you should be able to do something like:
module RSpec
module Core
class ExampleGroupMethods
class << self
define_example_method :they
end
end
end
end
You want to use alias_example_to:
RSpec.configure do |c|
c.alias_example_to :they
end
This is part of the public API of RSpec.