Permalink
Browse files

Fix Windows path matching issues introduced by 1c924af

  • Loading branch information...
1 parent 1816a0f commit bcf73c9a07f040edefeae0fd5feaf9d4fcf925bc @rarenerd rarenerd committed Jan 2, 2014
Showing with 8 additions and 8 deletions.
  1. +8 −8 spec/kitchen/loader/yaml_spec.rb
@@ -376,17 +376,17 @@ class Yamled
File.open("/tmp/.kitchen.yml", "wb") { |f| f.write '&*%^*' }
err = proc { loader.read }.must_raise Kitchen::UserError
- err.message.must_match Regexp.new(Regexp.escape(
- "Error parsing /tmp/.kitchen.yml"))
+ err.message.must_match Regexp.new(
+ "Error parsing ([a-zA-Z]:)?\/tmp\/\.kitchen\.yml")
end
it "raises a UserError if kitchen.yml cannot be parsed" do
FileUtils.mkdir_p "/tmp"
File.open("/tmp/.kitchen.yml", "wb") { |f| f.write 'uhoh' }
err = proc { loader.read }.must_raise Kitchen::UserError
- err.message.must_match Regexp.new(Regexp.escape(
- "Error parsing /tmp/.kitchen.yml"))
+ err.message.must_match Regexp.new(
+ "Error parsing ([a-zA-Z]:)?\/tmp\/\.kitchen\.yml")
end
it "handles a kitchen.yml if it is a commented out YAML document" do
@@ -426,8 +426,8 @@ class Yamled
end
err = proc { loader.read }.must_raise Kitchen::UserError
- err.message.must_match Regexp.new(Regexp.escape(
- "Error parsing ERB content in /tmp/.kitchen.yml"))
+ err.message.must_match Regexp.new(
+ "Error parsing ERB content in ([a-zA-Z]:)?\/tmp\/\.kitchen\.yml")
end
it "evaluates kitchen.local.yml through erb before loading by default" do
@@ -586,7 +586,7 @@ class Yamled
it "project config contains a filename" do
loader.diagnose[:project_config][:filename].
- must_equal "/tmp/.kitchen.yml"
+ must_match %r{/tmp/.kitchen.yml$}
end
it "project config contains raw data" do
@@ -598,7 +598,7 @@ class Yamled
it "local config contains a filename" do
loader.diagnose[:local_config][:filename].
- must_equal "/tmp/.kitchen.local.yml"
+ must_match %r{/tmp/.kitchen.local.yml$}
end
it "local config contains raw data" do

0 comments on commit bcf73c9

Please sign in to comment.