ActiveSupport::TestCase support

49 views
Skip to first unread message

theturingmachine

unread,
Jun 3, 2011, 10:22:42 AM6/3/11
to Rails On Emacs
Hi all,

I've done a patch to rinari to support activesupport tests in rails.

You can review the patch here. https://gist.github.com/1006410

I'm not very experienced with elisp, so the patch can probably be
improved. Also you can execute a single test only if you are on the
test declaration line. (test "something" do)

Greetings

Steve Purcell

unread,
Jun 5, 2011, 11:48:16 AM6/5/11
to emacs-o...@googlegroups.com
Cool. There was already some sort of support in place, right? What was
the incorrect behavior which this patch fixes?

-Steve

theturingmachine

unread,
Jun 6, 2011, 3:45:41 AM6/6/11
to Rails On Emacs
I tried with the latest version of rinari but it wasn't doing
anything. While inside a test it would always find the setup function
definition so it would never execute any test, you would have to be
placed outside any test. Right now that would still be the case, but
if you're on the test definition line you get the expected result. I
based it a little bit on the ruby-add-to-log function but nothing as
complex as you can see. If you were using it with normal tests like
"def test_something" it would work normally. With this patch both
cases should work now.

Greetings

On Jun 5, 5:48 pm, Steve Purcell <st...@sanityinc.com> wrote:
> Cool. There was already some sort of support in place, right? What was
> the incorrect behavior which this patch fixes?
>
> -Steve
>
>
>
>
>
>
>
> theturingmachine <theturingmach...@gmail.com> writes:
> > Hi all,
>
> > I've done a patch to rinari to support activesupport tests in rails.
>
> > You can review the patch here.https://gist.github.com/1006410

Steve Purcell

unread,
Jun 9, 2011, 5:10:15 PM6/9/11
to emacs-o...@googlegroups.com
Could you maybe try out my alternative formulation of your patch, by
replacing your rinari-test and rinari-test-function-name definitions
with the following? -

https://gist.github.com/1017754

-Steve

Reply all
Reply to author
Forward
0 new messages