Accidentally sent this just to Koz...

Also, I've been told that there is talk of refactoring Pagination all
together. I'm happy to take a shot at it. I tried to contact Sam on
IRC, but haven't received a response.

--------------

> In the meantime,  I do have some questions about 3606.   The use of
> 37signals as a fixture name breaks instantiated fixtures as @37signals
> is invalid,  that was a pretty simple fix though.

Sorry, I can change it to something else.

>
> My main question is why the tests are defined in a huge block, it
> feels a little strange to do
>
> ActiveRecordTestRunner::Base::run(:companies) do
>   ...
> end
>
> Rather than something like:
>
>   class ActiveRecordAssertionsControllerTest < ActiveRecordTestCase
>     self.fixture_path = "#{File.dirname(__FILE__)}/../fixtures/"
>     fixtures :companies
>   end

The reason the runner is formed this way is that it is simply an
extraction. There was connection code in
active_record_assertions_test.rb. I refactored the code there to the
helper. I don't disagree that more changes are needed. This was just
the quickest clean way to make things run and allow for reusable code.

I have completed the unit tests for pagination (excepting a test case
for singular_name as I don't really understand what it is used for),
but am waiting to submit until I see how this patch works out.

Kev

Reply   Forward
_______________________________________________
Rails-core mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to