[rspec-devel] [Proposed Refactoring] - Example -> ExampleDefinition && ExampleSpace -> Example
David Chelimsky
dchelimsky at gmail.com
Tue Aug 21 09:47:44 EDT 2007
On 8/21/07, Brian Takita <brian.takita at gmail.com> wrote:
> I propose renaming Example to ExampleDefinition and ExampleSpace to
> Example because the current ExampleSpace is the object that the
> example is run with.
>
> It seems a little too meta to be understandable, in my opinion.
I agree about it feeling meta. And I like the idea of changing
ExampleSpace to Example. I'm not sure about ExampleDefinition though.
Other ideas that come to mind are:
ExampleWrapper
ExampleProxy
ExampleDriver
ExampleConfig
ExampleContainer
Not really in love with any of these, but you get the idea.
> ExampleDefinition is a fitting name for the current Example class
> because it would hold the description and matches? method.
>
> It also responsible for running the example and setting up and tearing
> down the mocks.
> Does this mean that this class has too much responsibility?
I don't think so - it manages the lifecycle of an Example (perhaps
ExampleLifeCycleManager???) and these things are all related.
More information about the rspec-devel
mailing list