Yes, I see your point. The subtlety is that spec/swt_shoes MUST have the
:swt backend, whereas spec/shoes should fall back to :mock Shoes.backend
isn't set and SHOES_BACKEND isn't specified . So this was the easiest way
to achieve that and get this branch mergeable, given the time constraint of
doing this during Toby's presentation :p

I'll let it sink in and cook something up.


On 6 May 2013 02:55, Eric Watson <notifications@github.com> wrote:

> In lib/shoes/configuration.rb:
>
> >        end
> >
> >        def backend_name
> > -        @backend_name
> > +        @backend_name ||= ENV.fetch('SHOES_BACKEND', default_backend).to_sym
> > +      end
> > +
> > +      def default_backend
> > +        if caller.any? {|path| path =~ /rspec/}
>
> @arnebrasseur <https://github.com/arnebrasseur> checking the caller for
> rspec. Let's just make it the spec's responsibility to set the backend to
> what it needs, regardless of the default.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/shoes/shoes4/pull/250/files#r4088092>
> .
>