[rspec-devel] [Proposed Refactoring] - Example -> ExampleDefinition && ExampleSpace -> Example

David Chelimsky dchelimsky at gmail.com
Thu Aug 23 05:59:51 EDT 2007


On 8/23/07, Brian Takita <brian.takita at gmail.com> wrote:
> > ExampleWrapper
> > ExampleProxy
> > ExampleDriver
> > ExampleConfig
> > ExampleContainer
> > ExampleLifeCycle
>
> This object is currently responsible for:
> * Running the Example (this includes all lifecycle management)
> * Storing the Example description
> * Determining if the Example description matches another Example description
>
> I think these names encompass the all of the behaviour:
> * ExampleWrapper
> * ExampleDriver
> * ExampleContainer
> * ExampleLifeCycle (possibly)

ExampleWrapper and ExampleLifeCycle both express (to me) the
one-to-one mapping to Example that exists. Runner, Driver, and
Container all suggest collections to me, so I'd avoid these.

Of these, I think ExampleLifeCycle is the most interesting, but I'm
not convinced that the best name has appeared yet.

David

>
> ExampleRunner describes running the example, but not handling of the
> description.
> The class is mainly focused on running the example, with periphery
> behaviour associated with handling the description.
>
> On 8/23/07, Brian Takita <brian.takita at gmail.com> wrote:
> > I went ahead and renamed Example to ExampleRunner and ExampleSpace to Example.
> >
> > There is a solid consensus that ExampleSpace should be Example, and it is now.
> > We are still deciding on when the now ExampleRunner should be called.
> > I just picked ExampleRunner.
> >
> > I figure it will be easier to rename ExampleRunner, if we need to, now
> > that we don't need to do a double rename.
> >
> > On 8/22/07, Dan North <dan at tastapod.com> wrote:
> > >
> > >
> > >
> > >  The ExampleRunner invokes the Example, which is the actual block of code
> > > with some other useful information. The actual instance it invokes it in is
> > > the ExampleWorld.
> > >
> > >  I just realised that I gave the impression Example is just a value object.
> > > In fact it has a method run_in(world) - which just contains
> > > world.instance_eval(block) - that the ExampleRunner calls.
> > >
> > > _______________________________________________
> > > rspec-devel mailing list
> > > rspec-devel at rubyforge.org
> > > http://rubyforge.org/mailman/listinfo/rspec-devel
> > >
> >
> _______________________________________________
> rspec-devel mailing list
> rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel
>


More information about the rspec-devel mailing list