From: Daniel Pittman <[email protected]>

As part of implementing the fixture support I hard-coded the assumption that
the git checkout was a directory named 'puppet'; this broke on our CI server,
and would break for anyone else who didn't follow that default.

This commit eliminates that assumption and depends only on the appropriate
part of the input filename.

Reviewed-By: Paul Berry <[email protected]>
---
 spec/lib/puppet_spec/fixtures.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/spec/lib/puppet_spec/fixtures.rb b/spec/lib/puppet_spec/fixtures.rb
index 96bb1e3..7f6bc2a 100644
--- a/spec/lib/puppet_spec/fixtures.rb
+++ b/spec/lib/puppet_spec/fixtures.rb
@@ -5,7 +5,7 @@ module PuppetSpec::Fixtures
   def my_fixture_dir
     callers = caller
     while line = callers.shift do
-      next unless found = line.match(%r{puppet/spec/(.*)_spec\.rb:})
+      next unless found = line.match(%r{/spec/(.*)_spec\.rb:})
       return fixtures(found[1])
     end
     fail "sorry, I couldn't work out your path from the caller stack!"
-- 
1.7.4.1

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to