Forum: Radiant CMS Test failures when I have extra admin tabs and the reorder e

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Victor Cosby (Guest)
on 2007-05-24 23:57
(Received via mailing list)
I'm hoping someone else has run across the failures below and know how
they might be addressed before I go much further.

I've narrowed the failures down to two extensions I'm using, the
reorder and assets extensions. The StandardTagsTest fails due to the
reorder extension being added and the ExtensionInitializationTest
doesn't seem to recognize when an extension adds an admin tab.

I suspect there may be a conflict between the core Radiant tests and
the extensions since everything appears to be working fine in
development and production environments. And it seems like this kind
of conflict might be inevitable for some tests if an extension alters
core behavior, so I'm curious about how folks are avoiding that.

Thanks,
Victor

  1) Failure:
test_tag_children_each_attributes(StandardTagsTest)
    [/opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.1/test/helpers/render_test_helper.rb:5:in
`assert_renders'
     /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.1/test/unit/standard_tags_test.rb:34:in
`test_tag_children_each_attributes']:
<"a b c d e f g h i j "> expected but was <"j b c d e f g h i a ">

  2) Failure:
test_tag_children_each_with_status_attribute(StandardTagsTest)
    [/opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.1/test/helpers/render_test_helper.rb:12:in
`assert_render_match'
     /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.1/test/unit/standard_tags_test.rb:43:in
`test_tag_children_each_with_status_attribute']:
<"j a b c d e f g h i draft "> expected to be =~ </^(draft |)a b c d e
f g h i j( draft|) $/>

  3) Failure:
test_tag_children_first_parameters(StandardTagsTest)
    [/opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.1/test/helpers/render_test_helper.rb:5:in
`assert_renders'
     /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.1/test/unit/standard_tags_test.rb:103:in
`test_tag_children_first_parameters']:
<"a"> expected but was <"j">

  4) Failure:
test_tag_children_last_parameters(StandardTagsTest)
    [/opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.1/test/helpers/render_test_helper.rb:5:in
`assert_renders'
     /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.1/test/unit/standard_tags_test.rb:120:in
`test_tag_children_last_parameters']:
<"j"> expected but was <"a">

  5) Failure:
test_tag_parent(StandardTagsTest)
    [/opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.1/test/helpers/render_test_helper.rb:5:in
`assert_renders'
     /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.1/test/unit/standard_tags_test.rb:389:in
`test_tag_parent']:
<"DocumentationPage With Content Type Set On LayoutAnother Page With
LayoutGalleryInheritance Test PageSmall TestPage with YAML configTest
PageNews ArchivesAssorted RootNo CacheArchiveParentPage With
LayoutRadius Test PageTextile"> expected but was <"Another Page With
LayoutArchiveAssorted RootDocumentationGalleryInheritance Test
PageNews ArchivesNo CachePage With Content Type Set On LayoutPage With
LayoutPage with YAML configParentRadius Test PageSmall TestTest
PageTextile">

298 tests, 629 assertions, 5 failures, 0 errors


  1) Failure:
test_reactivate(ExtensionInitializationTest)
    [/opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.1/test/functional/extension_initialization_test.rb:68:in
`assert_admin_tabs'
     /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.1/test/functional/extension_initialization_test.rb:42:in
`test_reactivate']:
<4> expected but was
<5>.

  2) Failure:
test_reloading(ExtensionInitializationTest)
    [/opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.1/test/functional/extension_initialization_test.rb:68:in
`assert_admin_tabs'
     /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.1/test/functional/extension_initialization_test.rb:24:in
`test_reloading']:
<4> expected but was
<5>.

116 tests, 491 assertions, 2 failures, 0 errors
Adam W. (Guest)
on 2007-05-25 00:12
(Received via mailing list)
On May 24, 2007, at 3:55 PM, Victor Cosby wrote:

> I suspect there may be a conflict between the core Radiant tests and
> the extensions since everything appears to be working fine in
> development and production environments. And it seems like this kind
> of conflict might be inevitable for some tests if an extension alters
> core behavior, so I'm curious about how folks are avoiding that.

My recently checked in forms extension[1] also causes some Radiant
tests to fail. In particular, SiteController tests. I put a few
minutes into it and decided it wasn't worth the effort at the time. I
don't know how to avoid it yet, but I have the feeling that an
extension shouldn't cause core tests to stop working. I suppose in
the end, it is going to require them to know nothing concrete in the
way of object counts, tab counts, etc.

   aiwilliams

[1] http://dev.radiantcms.org/svn/radiant/trunk/extensions/forms
This topic is locked and can not be replied to.