test/facets/test_facet_container.rb in reality-facets-1.3.0 vs test/facets/test_facet_container.rb in reality-facets-1.4.0

- old
+ new

@@ -14,31 +14,31 @@ assert_equal false, TestFacetContainer.facet_by_name?(:gwt_rpc) assert_equal false, TestFacetContainer.facet?(:gwt_rpc) assert_equal [], TestFacetContainer.facet_keys assert_equal 0, TestFacetContainer.facets.size - assert_raise_message("Unknown facet 'gwt'") { TestFacetContainer.facet_by_name(:gwt) } - assert_raise_message("Unknown facet 'gwt_rpc'") { TestFacetContainer.facet_by_name(:gwt_rpc) } + assert_facet_error("Unknown facet 'gwt'") { TestFacetContainer.facet_by_name(:gwt) } + assert_facet_error("Unknown facet 'gwt_rpc'") { TestFacetContainer.facet_by_name(:gwt_rpc) } # Make sure we can add targets TestFacetContainer.target_manager.target(Component, :component) TestFacetContainer.facet(:gwt) # targets should be locked after first facet defined - assert_raise_message('Attempting to define target component when targets have been locked.') do + assert_facet_error('Attempting to define target component when targets have been locked.') do TestFacetContainer.target_manager.target(Component, :component) end assert_equal true, TestFacetContainer.facet_by_name?(:gwt) assert_equal true, TestFacetContainer.facet?(:gwt) assert_equal false, TestFacetContainer.facet_by_name?(:gwt_rpc) assert_equal false, TestFacetContainer.facet?(:gwt_rpc) assert_equal %w(gwt), TestFacetContainer.facet_keys assert_equal 1, TestFacetContainer.facets.size - assert_raise_message("Unknown facet 'gwt_rpc'") { TestFacetContainer.facet_by_name(:gwt_rpc) } + assert_facet_error("Unknown facet 'gwt_rpc'") { TestFacetContainer.facet_by_name(:gwt_rpc) } assert_equal TestFacetContainer, TestFacetContainer.facet_by_name(:gwt).facet_container assert_equal :gwt, TestFacetContainer.facet_by_name(:gwt).key assert_equal [], TestFacetContainer.facet_by_name(:gwt).required_facets assert_equal [], TestFacetContainer.facet_by_name(:gwt).suggested_facets @@ -55,12 +55,12 @@ assert_equal TestFacetContainer, TestFacetContainer.facet_by_name(:gwt_rpc).facet_container assert_equal :gwt_rpc, TestFacetContainer.facet_by_name(:gwt_rpc).key assert_equal [:gwt], TestFacetContainer.facet_by_name(:gwt_rpc).required_facets assert_equal [], TestFacetContainer.facet_by_name(:gwt_rpc).suggested_facets - assert_raise_message('Attempting to redefine facet gwt') { TestFacetContainer.facet(:gwt) } + assert_facet_error('Attempting to redefine facet gwt') { TestFacetContainer.facet(:gwt) } - assert_raise_message("Unknown definition form '{:x=>:y, :z=>1}'") { TestFacetContainer.facet(:x => :y, :z => 1) } + assert_facet_error("Unknown definition form '{:x=>:y, :z=>1}'") { TestFacetContainer.facet(:x => :y, :z => 1) } end def test_dependent_facets TestFacetContainer.facet(:gwt) TestFacetContainer.facet(:gwt_rpc => [:gwt])