You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2013/10/06 23:56:53 UTC

svn commit: r1529701 - /buildr/trunk/spec/ide/idea_spec.rb

Author: donaldp
Date: Sun Oct  6 21:56:52 2013
New Revision: 1529701

URL: http://svn.apache.org/r1529701
Log:
Add test to ensure no jsf facet is generated if not specified

Modified:
    buildr/trunk/spec/ide/idea_spec.rb

Modified: buildr/trunk/spec/ide/idea_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/ide/idea_spec.rb?rev=1529701&r1=1529700&r2=1529701&view=diff
==============================================================================
--- buildr/trunk/spec/ide/idea_spec.rb (original)
+++ buildr/trunk/spec/ide/idea_spec.rb Sun Oct  6 21:56:52 2013
@@ -406,6 +406,23 @@ describe Buildr::IntellijIdea do
       end
     end
 
+    describe "using add_web_facet should default to no jsf" do
+      before do
+        write "src/main/webapp/WEB-INF/web.xml"
+
+        @foo = define "foo" do
+          iml.add_web_facet
+        end
+        invoke_generate_task
+      end
+
+      it "does not generate a web facet with jsf facet" do
+        doc = xml_document(@foo._("foo.iml"))
+        web_facet_xpath = ensure_facet_xpath(doc, 'web', 'Web')
+        doc.should_not have_xpath("#{web_facet_xpath}/facet[@type='jsf', @name='JSF']")
+      end
+    end
+
     describe "using add_web_facet with jsf and idea version 13" do
       before do
         write "src/main/webapp/WEB-INF/web.xml"