Add test to ensure no jsf facet is generated if not specified
authorPeter Donald <donaldp@apache.org>
Sun, 6 Oct 2013 21:56:52 +0000 (21:56 +0000)
committerPeter Donald <donaldp@apache.org>
Sun, 6 Oct 2013 21:56:52 +0000 (21:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/buildr/trunk@1529701 13f79535-47bb-0310-9956-ffa450edef68

spec/ide/idea_spec.rb

index c83fbe1..b6ebd83 100644 (file)
@@ -406,6 +406,23 @@ describe Buildr::IntellijIdea do
       end\r
     end\r
 \r
+    describe "using add_web_facet should default to no jsf" do\r
+      before do\r
+        write "src/main/webapp/WEB-INF/web.xml"\r
+\r
+        @foo = define "foo" do\r
+          iml.add_web_facet\r
+        end\r
+        invoke_generate_task\r
+      end\r
+\r
+      it "does not generate a web facet with jsf facet" do\r
+        doc = xml_document(@foo._("foo.iml"))\r
+        web_facet_xpath = ensure_facet_xpath(doc, 'web', 'Web')\r
+        doc.should_not have_xpath("#{web_facet_xpath}/facet[@type='jsf', @name='JSF']")\r
+      end\r
+    end\r
+\r
     describe "using add_web_facet with jsf and idea version 13" do\r
       before do\r
         write "src/main/webapp/WEB-INF/web.xml"\r