We've recently used it as well.
I can see your concern here, Dan. As a framework builder, one must be
careful about what he encourages folks to do.
At the same time, allowing access to aspects of the framework to the
end that users may go beyond the imaginings of the framework
designers is a very important part of framework design, IMO. To my
experience, these hooks are what allow the most advanced programmers
to go further. Again, I agree that we do not want to be in a position
where something like the Radiant test data is a form of public API. I
for one am quite willing to use that data at my own risk, recognizing
that should the time come that it changes, I will have a bit of work
to do. I don't suppose a person would upgrade to a later version of
Radiant expecting to do no work ;)
I have a friend who has said that making methods private is like
saying to all future users of the code, "I'm smarter than you - there
is no reason you should ever want to touch this". Of course, I'm more
of the mind that private is a design tool, indicating more that, "I
can't imagine right now why you would ever want to change this". In
this frame of mind, I trust that Ruby will allow them work around my
shortsightedness ;), whereas a language like Java, half the
programmers using it don't even begin to know how to invoke a private
method.
Anyway, we use the Radiant test data because it saves us a bunch of
time writing our own.
aiwilliams
On May 10, 2007, at 8:38 AM, Sean Cribbs wrote:
> Yes, I have used it. In fact, I wrote that patch/extension. Are you
> going to be at RailsConf? Maybe we can meet up and hack on some stuff.
>
> Sean
>
> On 5/10/07, Daniel Sheppard <[EMAIL PROTECTED]> wrote:
>> We seem to have a patch in place that allows fixtures to be loaded
>> from multiple directories. To do so, we have changed
>> Test::Unit::TestCase.fixture_path from a string to an array.
>>
>> What is the justification for this? It looks like it's there for
>> extension testing, but can't extensions just provide their own
>> fixtures to provide enough data for what they want to test?
>>
>> If we're allowing extensions to use the core test data, then that
>> test data has become something published, and as such needs to be
>> kept in a backwards-compatible manner - do we want to take that on?
>>
>> I just stumbled across this as I was trying to write a test for an
>> extension that calls 'fixture_file_upload' (part of rails core) -
>> that method expects that fixture_path is a string. I could extend
>> the patch to change the behaviour of ActionController::TestProcess
>> so that that will work, but that doesn't mean that there aren't
>> plugins out there that rely on fixture_path being in place that will
>> also be broken by that change.
>>
>> Has anybody actually written an extension that needs this
>> functionality for its testing? If not, I'd like to just remove the
>> fixture_loading_extension.rb patch.
>>
>> Dan.
>> _______________________________________________
>> Radiant mailing list
>> Post: [email protected]
>> Search: http://radiantcms.org/mailing-list/search/
>> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
>>
> _______________________________________________
> Radiant mailing list
> Post: [email protected]
> Search: http://radiantcms.org/mailing-list/search/
> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant