Update xpaths to correctly use conjunction in attribtue guards

Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/a08a6900
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/a08a6900
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/a08a6900

Branch: refs/heads/master
Commit: a08a690024ed4a12d046b1f758eaf0b0abd2322d
Parents: 2687200
Author: Peter Donald <[email protected]>
Authored: Sun May 25 15:55:47 2014 +1000
Committer: Peter Donald <[email protected]>
Committed: Sun May 25 15:55:47 2014 +1000

----------------------------------------------------------------------
 spec/ide/idea_spec.rb | 106 ++++++++++++++++++++++-----------------------
 1 file changed, 53 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/a08a6900/spec/ide/idea_spec.rb
----------------------------------------------------------------------
diff --git a/spec/ide/idea_spec.rb b/spec/ide/idea_spec.rb
index b85e121..adaabe2 100644
--- a/spec/ide/idea_spec.rb
+++ b/spec/ide/idea_spec.rb
@@ -20,7 +20,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), 
'..', 'xpath_matchers
 def ensure_facet_xpath(doc, type, name)
   facet_xpath = "/module/component[@name='FacetManager']/facet"
   doc.should have_xpath(facet_xpath)
-  web_facet_xpath = "#{facet_xpath}[@type='#{type}', @name='#{name}']"
+  web_facet_xpath = "#{facet_xpath}[@type='#{type}' and @name='#{name}']"
   doc.should have_xpath(web_facet_xpath)
   web_facet_xpath
 end
@@ -122,7 +122,7 @@ describe Buildr::IntellijIdea do
         end
 
         it "generates one exported 'module-library' orderEntry in IML" do
-          root_module_xml(@foo).should 
have_nodes("#{order_entry_xpath}[@type='module-library', 
@exported='']/library/CLASSES/root", 1)
+          root_module_xml(@foo).should 
have_nodes("#{order_entry_xpath}[@type='module-library' and 
@exported='']/library/CLASSES/root", 1)
         end
       end
 
@@ -136,7 +136,7 @@ describe Buildr::IntellijIdea do
         end
 
         it "generates one exported 'module-library' orderEntry in IML" do
-          root_module_xml(@foo).should 
have_nodes("#{order_entry_xpath}[@type='module-library', 
@exported='']/library/CLASSES/root", 1)
+          root_module_xml(@foo).should 
have_nodes("#{order_entry_xpath}[@type='module-library' and 
@exported='']/library/CLASSES/root", 1)
         end
       end
 
@@ -181,7 +181,7 @@ describe Buildr::IntellijIdea do
         end
 
         it "generates 'module-library' orderEntry in IML with SOURCES 
specified" do
-          root_module_xml(@foo).should 
have_nodes("#{order_entry_xpath}[@type='module-library', 
@exported='']/library/SOURCES/root", 1)
+          root_module_xml(@foo).should 
have_nodes("#{order_entry_xpath}[@type='module-library' and 
@exported='']/library/SOURCES/root", 1)
         end
       end
 
@@ -264,11 +264,11 @@ describe Buildr::IntellijIdea do
         doc = xml_document(@foo._("foo.ipr"))
         doc.should have_nodes("#{xpath_to_module}", 3)
         module_ref = "$PROJECT_DIR$/foo.iml"
-        doc.should 
have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}', 
@filepath='#{module_ref}']")
+        doc.should 
have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' and 
@filepath='#{module_ref}']")
         module_ref = "$PROJECT_DIR$/other.iml"
-        doc.should 
have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}', 
@filepath='#{module_ref}']")
+        doc.should 
have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' and 
@filepath='#{module_ref}']")
         module_ref = "$PROJECT_DIR$/other_other.iml"
-        doc.should 
have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}', 
@filepath='#{module_ref}']")
+        doc.should 
have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' and 
@filepath='#{module_ref}']")
       end
     end
 
@@ -326,8 +326,8 @@ describe Buildr::IntellijIdea do
         doc = xml_document(@foo._("foo.iml"))
         facet_xpath = ensure_facet_xpath(doc, 'gwt', 'GWT')
         prefix = "#{facet_xpath}/configuration/packaging/module"
-        doc.should have_xpath("#{prefix}[@name='com.biz.MyModule', 
@enabled='true']")
-        doc.should have_xpath("#{prefix}[@name='com.biz.MyOtherModule', 
@enabled='false']")
+        doc.should have_xpath("#{prefix}[@name='com.biz.MyModule' and 
@enabled='true']")
+        doc.should have_xpath("#{prefix}[@name='com.biz.MyOtherModule' and 
@enabled='false']")
       end
     end
 
@@ -402,7 +402,7 @@ describe Buildr::IntellijIdea do
       it "generates a web facet with jsf facet auto-detected" do
         doc = xml_document(@foo._("foo.iml"))
         web_facet_xpath = ensure_facet_xpath(doc, 'web', 'Web')
-        doc.should have_xpath("#{web_facet_xpath}/facet[@type='jsf', 
@name='JSF']")
+        doc.should have_xpath("#{web_facet_xpath}/facet[@type='jsf' and 
@name='JSF']")
       end
     end
 
@@ -419,7 +419,7 @@ describe Buildr::IntellijIdea do
       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']")
+        doc.should_not have_xpath("#{web_facet_xpath}/facet[@type='jsf' and 
@name='JSF']")
       end
     end
 
@@ -438,7 +438,7 @@ describe Buildr::IntellijIdea do
       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']")
+        doc.should_not have_xpath("#{web_facet_xpath}/facet[@type='jsf' and 
@name='JSF']")
       end
     end
 
@@ -457,7 +457,7 @@ describe Buildr::IntellijIdea do
       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']")
+        doc.should_not have_xpath("#{web_facet_xpath}/facet[@type='jsf' and 
@name='JSF']")
       end
     end
 
@@ -484,7 +484,7 @@ describe Buildr::IntellijIdea do
       it "generates a web facet with derived webroots" do
         doc = xml_document(@foo._("foo.iml"))
         web_facet_xpath = ensure_facet_xpath(doc, 'web', 'Web')
-        doc.should 
have_xpath("#{web_facet_xpath}/configuration/webroots/root[@url='file://$MODULE_DIR$/src/main/webapp',
 @realtive='/']")
+        doc.should 
have_xpath("#{web_facet_xpath}/configuration/webroots/root[@url='file://$MODULE_DIR$/src/main/webapp'
 and @realtive='/']")
       end
     end
 
@@ -507,8 +507,8 @@ describe Buildr::IntellijIdea do
       it "generates a web facet with specified webroots" do
         doc = xml_document(@foo._("foo.iml"))
         web_facet_xpath = ensure_facet_xpath(doc, 'web', 'Web')
-        doc.should 
have_xpath("#{web_facet_xpath}/configuration/webroots/root[@url='file://$MODULE_DIR$/src/main/webapp2',
 @realtive='/']")
-        doc.should 
have_xpath("#{web_facet_xpath}/configuration/webroots/root[@url='file://$MODULE_DIR$/src/main/css',
 @realtive='/css']")
+        doc.should 
have_xpath("#{web_facet_xpath}/configuration/webroots/root[@url='file://$MODULE_DIR$/src/main/webapp2'
 and @realtive='/']")
+        doc.should 
have_xpath("#{web_facet_xpath}/configuration/webroots/root[@url='file://$MODULE_DIR$/src/main/css'
 and @realtive='/css']")
       end
     end
 
@@ -534,8 +534,8 @@ describe Buildr::IntellijIdea do
       it "generates a jpa facet with default settings" do
         doc = xml_document(@foo._("foo.iml"))
         facet_xpath = ensure_facet_xpath(doc, 'jpa', 'JPA')
-        doc.should 
have_xpath("#{facet_xpath}/configuration/setting[@name='validation-enabled', 
@value='true']")
-        doc.should 
have_xpath("#{facet_xpath}/configuration/setting[@name='provider-name', 
@value='Hibernate']")
+        doc.should 
have_xpath("#{facet_xpath}/configuration/setting[@name='validation-enabled' and 
@value='true']")
+        doc.should 
have_xpath("#{facet_xpath}/configuration/setting[@name='provider-name' and 
@value='Hibernate']")
       end
     end
 
@@ -563,8 +563,8 @@ describe Buildr::IntellijIdea do
       it "generates a jpa facet with default settings" do
         doc = xml_document(@foo._("foo.iml"))
         facet_xpath = ensure_facet_xpath(doc, 'jpa', 'JPA')
-        doc.should 
have_xpath("#{facet_xpath}/configuration/setting[@name='validation-enabled', 
@value='true']")
-        doc.should 
have_xpath("#{facet_xpath}/configuration/setting[@name='provider-name', 
@value='Hibernate']")
+        doc.should 
have_xpath("#{facet_xpath}/configuration/setting[@name='validation-enabled' and 
@value='true']")
+        doc.should 
have_xpath("#{facet_xpath}/configuration/setting[@name='provider-name' and 
@value='Hibernate']")
       end
     end
 
@@ -604,8 +604,8 @@ describe Buildr::IntellijIdea do
       it "generates a jpa facet with default settings" do
         doc = xml_document(@foo._("foo.iml"))
         facet_xpath = ensure_facet_xpath(doc, 'jpa', 'JPA')
-        doc.should 
have_xpath("#{facet_xpath}/configuration/setting[@name='validation-enabled', 
@value='true']")
-        doc.should 
have_xpath("#{facet_xpath}/configuration/setting[@name='provider-name', 
@value='Hibernate']")
+        doc.should 
have_xpath("#{facet_xpath}/configuration/setting[@name='validation-enabled' and 
@value='true']")
+        doc.should 
have_xpath("#{facet_xpath}/configuration/setting[@name='provider-name' and 
@value='Hibernate']")
       end
     end
 
@@ -623,8 +623,8 @@ describe Buildr::IntellijIdea do
       it "generates a jpa facet with default settings" do
         doc = xml_document(@foo._("foo.iml"))
         facet_xpath = ensure_facet_xpath(doc, 'jpa', 'JPA')
-        doc.should 
have_xpath("#{facet_xpath}/configuration/setting[@name='validation-enabled', 
@value='true']")
-        doc.should 
have_xpath("#{facet_xpath}/configuration/setting[@name='provider-name', 
@value='EclipseLink']")
+        doc.should 
have_xpath("#{facet_xpath}/configuration/setting[@name='validation-enabled' and 
@value='true']")
+        doc.should 
have_xpath("#{facet_xpath}/configuration/setting[@name='provider-name' and 
@value='EclipseLink']")
       end
     end
 
@@ -763,9 +763,9 @@ describe Buildr::IntellijIdea do
 
       it "generates a data source manager with specified data source" do
         doc = xml_document(@foo._("foo.ipr"))
-        prefix_xpath = "/project/component[@name='DataSourceManagerImpl', 
@format='xml', @hash='3208837817']/data-source"
+        prefix_xpath = "/project/component[@name='DataSourceManagerImpl' and 
@format='xml' and @hash='3208837817']/data-source"
         doc.should have_nodes(prefix_xpath, 1)
-        ds_path = "#{prefix_xpath}[@source='LOCAL', @name='Postgres']"
+        ds_path = "#{prefix_xpath}[@source='LOCAL' and @name='Postgres']"
         doc.should have_xpath(ds_path)
         doc.should have_xpath("#{ds_path}/synchronize/text() = 'true'")
         doc.should have_xpath("#{ds_path}/jdbc-driver/text() = 
'org.postgresql.Driver'")
@@ -789,9 +789,9 @@ describe Buildr::IntellijIdea do
 
       it "generates a data source manager with specified data source" do
         doc = xml_document(@foo._("foo.ipr"))
-        prefix_xpath = "/project/component[@name='DataSourceManagerImpl', 
@format='xml', @hash='3208837817']/data-source"
+        prefix_xpath = "/project/component[@name='DataSourceManagerImpl' and 
@format='xml' and @hash='3208837817']/data-source"
         doc.should have_nodes(prefix_xpath, 1)
-        ds_path = "#{prefix_xpath}[@source='LOCAL', @name='Postgres']"
+        ds_path = "#{prefix_xpath}[@source='LOCAL' and @name='Postgres']"
         doc.should have_xpath(ds_path)
         doc.should have_xpath("#{ds_path}/synchronize/text() = 'true'")
         doc.should have_xpath("#{ds_path}/jdbc-driver/text() = 
'org.postgresql.Driver'")
@@ -814,9 +814,9 @@ describe Buildr::IntellijIdea do
 
       it "generates a data source manager with specified data source" do
         doc = xml_document(@foo._("foo.ipr"))
-        prefix_xpath = "/project/component[@name='DataSourceManagerImpl', 
@format='xml', @hash='3208837817']/data-source"
+        prefix_xpath = "/project/component[@name='DataSourceManagerImpl' and 
@format='xml' and @hash='3208837817']/data-source"
         doc.should have_nodes(prefix_xpath, 1)
-        ds_path = "#{prefix_xpath}[@source='LOCAL', @name='SqlServer']"
+        ds_path = "#{prefix_xpath}[@source='LOCAL' and @name='SqlServer']"
         doc.should have_xpath(ds_path)
 
         doc.should have_xpath("#{ds_path}/synchronize/text() = 'true'")
@@ -847,8 +847,8 @@ describe Buildr::IntellijIdea do
         doc = xml_document(@foo._("foo.ipr"))
         facet_xpath = "/project/component[@name='ArtifactManager']/artifact"
         doc.should have_nodes(facet_xpath, 2)
-        doc.should have_xpath("#{facet_xpath}[@type='jar', 
@name='MyFancy.jar']")
-        doc.should have_xpath("#{facet_xpath}[@type='jar', 
@name='MyOtherFancy.jar']")
+        doc.should have_xpath("#{facet_xpath}[@type='jar' and 
@name='MyFancy.jar']")
+        doc.should have_xpath("#{facet_xpath}[@type='jar' and 
@name='MyOtherFancy.jar']")
       end
     end
 
@@ -995,8 +995,8 @@ describe Buildr::IntellijIdea do
         doc.should have_xpath(facet_xpath)
 
         doc.should have_xpath("#{facet_xpath}/output-path/text() = 
$PROJECT_DIR$/artifacts/bar")
-        doc.should 
have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' and 
@name='WEB-INF']/element[@id='directory', 
@name='classes']/element[@id='module-output' and @name='bar']")
-        doc.should 
have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' and 
@name='WEB-INF']/element[@id='directory', @name='lib']/element[@id='file-copy' 
and 
@path='$MAVEN_REPOSITORY$/net/sourceforge/jtds/jtds/1.2.7.XX/jtds-1.2.7.XX.jar']")
+        doc.should 
have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' and 
@name='WEB-INF']/element[@id='directory' and 
@name='classes']/element[@id='module-output' and @name='bar']")
+        doc.should 
have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' and 
@name='WEB-INF']/element[@id='directory' and 
@name='lib']/element[@id='file-copy' and 
@path='$MAVEN_REPOSITORY$/net/sourceforge/jtds/jtds/1.2.7.XX/jtds-1.2.7.XX.jar']")
         doc.should 
have_xpath("#{facet_xpath}/root[@id='root']/element[@id='javaee-facet-resources'
 and @facet='bar/web/Web']")
       end
     end
@@ -1025,18 +1025,18 @@ describe Buildr::IntellijIdea do
       it "generates an IPR with a war artifact" do
         doc = xml_document(@foo._("foo.ipr"))
         base_xpath = "/project/component[@name='ArtifactManager']/artifact"
-        facet_xpath = "#{base_xpath}[@type='exploded-war' @name='MyFancy.jar', 
@build-on-make='false']"
+        facet_xpath = "#{base_xpath}[@type='exploded-war' @name='MyFancy.jar' 
and @build-on-make='false']"
         doc.should have_xpath(facet_xpath)
 
         doc.should have_xpath("#{facet_xpath}/output-path/text() = 
$PROJECT_DIR$/artifacts/gar")
-        doc.should 
have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' and 
@name='WEB-INF']/element[@id='directory', 
@name='classes']/element[@id='module-output' and @name='bar']")
-        doc.should 
have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' and 
@name='WEB-INF']/element[@id='directory', @name='lib']/element[@id='file-copy' 
and 
@path='$MAVEN_REPOSITORY$/net/sourceforge/jtds/jtds/1.2.7.XX/jtds-1.2.7.XX.jar']")
+        doc.should 
have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' and 
@name='WEB-INF']/element[@id='directory' and 
@name='classes']/element[@id='module-output' and @name='bar']")
+        doc.should 
have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' and 
@name='WEB-INF']/element[@id='directory' and 
@name='lib']/element[@id='file-copy' and 
@path='$MAVEN_REPOSITORY$/net/sourceforge/jtds/jtds/1.2.7.XX/jtds-1.2.7.XX.jar']")
         doc.should 
have_xpath("#{facet_xpath}/root[@id='root']/element[@id='javaee-facet-resources'
 and @facet='x/web/Web']")
         doc.should 
have_xpath("#{facet_xpath}/root[@id='root']/element[@id='javaee-facet-resources'
 and @facet='y/web/Web']")
         doc.should 
have_xpath("#{facet_xpath}/root[@id='root']/element[@id='gwt-compiler-output' 
and @facet='p/gwt/GWT']")
         doc.should 
have_xpath("#{facet_xpath}/root[@id='root']/element[@id='gwt-compiler-output' 
and @facet='q/gwt/GWT']")
-        doc.should 
have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' and 
@name='WEB-INF']/element[@id='directory', @name='lib']/element[@id='artifact' 
and @artifact-name='baz.jar']")
-        doc.should 
have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' and 
@name='WEB-INF']/element[@id='directory', @name='lib']/element[@id='artifact' 
and @artifact-name='biz.jar']")
+        doc.should 
have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' and 
@name='WEB-INF']/element[@id='directory' and 
@name='lib']/element[@id='artifact' and @artifact-name='baz.jar']")
+        doc.should 
have_xpath("#{facet_xpath}/root[@id='root']/element[@id='directory' and 
@name='WEB-INF']/element[@id='directory' and 
@name='lib']/element[@id='artifact' and @artifact-name='biz.jar']")
       end
     end
 
@@ -1071,8 +1071,8 @@ describe Buildr::IntellijIdea do
         doc = xml_document(@foo._("foo.ipr"))
         facet_xpath = 
"/project/component[@name='ProjectRunConfigurationManager']/configuration"
         doc.should have_nodes(facet_xpath, 2)
-        doc.should have_xpath("#{facet_xpath}[@type='GWT.ConfigurationType', 
@name='Run Contacts.html']")
-        doc.should have_xpath("#{facet_xpath}[@type='GWT.ConfigurationType', 
@name='Run Planner.html']")
+        doc.should have_xpath("#{facet_xpath}[@type='GWT.ConfigurationType' 
and @name='Run Contacts.html']")
+        doc.should have_xpath("#{facet_xpath}[@type='GWT.ConfigurationType' 
and @name='Run Planner.html']")
       end
     end
 
@@ -1097,7 +1097,7 @@ describe Buildr::IntellijIdea do
         doc = xml_document(@foo._("foo.ipr"))
         facet_xpath = 
"/project/component[@name='ProjectRunConfigurationManager']/configuration"
         doc.should have_nodes(facet_xpath, 1)
-        doc.should have_xpath("#{facet_xpath}[@type='GWT.ConfigurationType' 
AND @factoryName='GWT Configuration' AND @default='true']")
+        doc.should have_xpath("#{facet_xpath}[@type='GWT.ConfigurationType' 
and @factoryName='GWT Configuration' and @default='true']")
       end
     end
 
@@ -1121,13 +1121,13 @@ describe Buildr::IntellijIdea do
         doc = xml_document(@foo._("foo.ipr"))
         doc.should have_nodes("#{xpath_to_module}", 4)
         module_ref = "$PROJECT_DIR$/foo.iml"
-        doc.should 
have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}', 
@filepath='#{module_ref}']")
+        doc.should 
have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' and 
@filepath='#{module_ref}']")
         module_ref = "$PROJECT_DIR$/rab/rab.iml"
-        doc.should 
have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}', 
@filepath='#{module_ref}' @group = 'MyGroup']")
+        doc.should 
have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' and 
@filepath='#{module_ref}' @group = 'MyGroup']")
         module_ref = "$PROJECT_DIR$/bar/bar.iml"
-        doc.should 
have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}', 
@filepath='#{module_ref}' @group = 'foo']")
+        doc.should 
have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' and 
@filepath='#{module_ref}' @group = 'foo']")
         module_ref = "$PROJECT_DIR$/bar/baz/baz.iml"
-        doc.should 
have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}', 
@filepath='#{module_ref}' @group = 'foo/bar']")
+        doc.should 
have_xpath("#{xpath_to_module}[@fileurl='file://#{module_ref}' and 
@filepath='#{module_ref}' @group = 'foo/bar']")
       end
     end
 
@@ -1158,7 +1158,7 @@ describe Buildr::IntellijIdea do
           File.should be_exist(@foo._("foo.ipr"))
           doc = xml_document(@foo._("foo.ipr"))
           module_ref = "$PROJECT_DIR$/foo.iml"
-          doc.should 
have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}', 
@filepath='#{module_ref}']", 1)
+          doc.should 
have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}' and 
@filepath='#{module_ref}']", 1)
         end
       end
 
@@ -1226,7 +1226,7 @@ describe Buildr::IntellijIdea do
           File.should be_exist(@foo._("fooble.ipr"))
           doc = xml_document(@foo._("fooble.ipr"))
           module_ref = "$PROJECT_DIR$/feap.iml"
-          doc.should 
have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}', 
@filepath='#{module_ref}']", 1)
+          doc.should 
have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}' and 
@filepath='#{module_ref}']", 1)
         end
       end
 
@@ -1252,7 +1252,7 @@ describe Buildr::IntellijIdea do
           doc = xml_document(@foo._("foo-ipr-suffix.ipr"))
           doc.should have_nodes("#{xpath_to_module}", 1)
           module_ref = "$PROJECT_DIR$/foo-iml-suffix.iml"
-          doc.should 
have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}', 
@filepath='#{module_ref}']", 1)
+          doc.should 
have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}' and 
@filepath='#{module_ref}']", 1)
         end
       end
     end
@@ -1278,9 +1278,9 @@ describe Buildr::IntellijIdea do
         doc = xml_document(@foo._("foo.ipr"))
         doc.should have_nodes("#{xpath_to_module}", 2)
         module_ref = "$PROJECT_DIR$/foo.iml"
-        doc.should 
have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}', 
@filepath='#{module_ref}']", 1)
+        doc.should 
have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}' and 
@filepath='#{module_ref}']", 1)
         module_ref = "$PROJECT_DIR$/bar/bar.iml"
-        doc.should 
have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}', 
@filepath='#{module_ref}']", 1)
+        doc.should 
have_nodes("#{xpath_to_module}[@fileurl='file://#{module_ref}' and 
@filepath='#{module_ref}']", 1)
       end
     end
 
@@ -1317,7 +1317,7 @@ describe Buildr::IntellijIdea do
         doc = xml_document(@foo._("foo.ipr"))
         doc.should have_nodes("#{xpath_to_module}", 5)
         ["foo.iml", "fe/bar.iml", "fi/baz.iml", "fi/foe/foe.iml", 
"fe/fum/fum.iml"].each do |module_ref|
-          doc.should 
have_nodes("#{xpath_to_module}[@fileurl='file://$PROJECT_DIR$/#{module_ref}', 
@filepath='$PROJECT_DIR$/#{module_ref}']", 1)
+          doc.should 
have_nodes("#{xpath_to_module}[@fileurl='file://$PROJECT_DIR$/#{module_ref}' 
and @filepath='$PROJECT_DIR$/#{module_ref}']", 1)
         end
       end
     end
@@ -1356,7 +1356,7 @@ describe Buildr::IntellijIdea do
       end
 
       it "depends on the associated module exactly once" do
-        @bar_iml.should have_nodes("//orderEntry[@type='module', 
@module-name='foo', @exported=""]", 1)
+        @bar_iml.should have_nodes("//orderEntry[@type='module' and 
@module-name='foo' and @exported=""]", 1)
       end
 
       it "does not depend on the other project's packaged JAR" do

Reply via email to