<feed xmlns='http://www.w3.org/2005/Atom'>
<title>puppet.git/spec/lib/puppet_spec, branch master</title>
<subtitle>Puppet repo</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/'/>
<entry>
<title>Consolidate test logic determining if a registered file is in the temp directory</title>
<updated>2011-08-02T23:33:47+00:00</updated>
<author>
<name>Jacob Helwig</name>
<email>jacob@puppetlabs.com</email>
</author>
<published>2011-08-02T17:46:53+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=3aec02ba0e4bda8ba4e9fffbc6defaae4e4e2ba1'/>
<id>3aec02ba0e4bda8ba4e9fffbc6defaae4e4e2ba1</id>
<content type='text'>
Previously, we were always using string comparisons, and hard-coded
paths to temp locations on non-Windows platforms.  This was
problematic for a few reasons.  We had to maintain a list of temp
locations for the various platforms, and the string comparisons were
unreliable on Windows, since paths have two string representations
(the "short" name containing a ~ followed by a number, and the "full"
name).

By getting the current temp location using Dir.tempdir (the same
mechanism our temp creation code uses), we no longer need to maintain
the list of temp locations.  Also, rather than doing string
comparisons on file paths, we can use a combination of
Pathname#ascend, and File.identical? to determine if the path
registered as a temp file for deletion was actually created in the
temp location.

With this refactoring, the same code now works for both Windows, and
non-Windows platforms.

Reviewed-by: Nick Lewis &lt;nick@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, we were always using string comparisons, and hard-coded
paths to temp locations on non-Windows platforms.  This was
problematic for a few reasons.  We had to maintain a list of temp
locations for the various platforms, and the string comparisons were
unreliable on Windows, since paths have two string representations
(the "short" name containing a ~ followed by a number, and the "full"
name).

By getting the current temp location using Dir.tempdir (the same
mechanism our temp creation code uses), we no longer need to maintain
the list of temp locations.  Also, rather than doing string
comparisons on file paths, we can use a combination of
Pathname#ascend, and File.identical? to determine if the path
registered as a temp file for deletion was actually created in the
temp location.

With this refactoring, the same code now works for both Windows, and
non-Windows platforms.

Reviewed-by: Nick Lewis &lt;nick@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix tests with "relative" paths on Windows</title>
<updated>2011-07-19T21:06:36+00:00</updated>
<author>
<name>Josh Cooper</name>
<email>josh@puppetlabs.com</email>
</author>
<published>2011-07-19T06:05:35+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=462a95e3d077b1915a919399b846068816c84583'/>
<id>462a95e3d077b1915a919399b846068816c84583</id>
<content type='text'>
Absolute paths on Unix, e.g. /foo/bar, are not absolute on Windows,
which breaks many test cases. This commit adds a method to
PuppetSpec::Files.make_absolute that makes the path absolute in
test cases.

On Unix (Puppet.features.posix?) it is a no-op. On Windows,
(Puppet.features.microsoft_windows?) the drive from the current
 working directory is prepended.

Reviewed-by: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Absolute paths on Unix, e.g. /foo/bar, are not absolute on Windows,
which breaks many test cases. This commit adds a method to
PuppetSpec::Files.make_absolute that makes the path absolute in
test cases.

On Unix (Puppet.features.posix?) it is a no-op. On Windows,
(Puppet.features.microsoft_windows?) the drive from the current
 working directory is prepended.

Reviewed-by: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>maint: add a 'print' matcher to rspec, to inspect std{out,err}</title>
<updated>2011-04-28T21:50:12+00:00</updated>
<author>
<name>Daniel Pittman</name>
<email>daniel@puppetlabs.com</email>
</author>
<published>2011-04-28T17:48:24+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=351b6fc5327baf8f2339fed04c3a8e54280fc394'/>
<id>351b6fc5327baf8f2339fed04c3a8e54280fc394</id>
<content type='text'>
You can now write expectations along the lines of:

  expect { ... }.to print /whatever/

This will do the expected thing, which is to require that we print something
matching that regular expression during the block.  The output itself is
suppressed during operation of the matcher.

Paired-With: Max Martin &lt;max@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
You can now write expectations along the lines of:

  expect { ... }.to print /whatever/

This will do the expected thing, which is to require that we print something
matching that regular expression during the block.  The output itself is
suppressed during operation of the matcher.

Paired-With: Max Martin &lt;max@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>maint: clean up the spec test headers in bulk.</title>
<updated>2011-04-13T07:36:38+00:00</updated>
<author>
<name>Daniel Pittman</name>
<email>daniel@puppetlabs.com</email>
</author>
<published>2011-04-13T07:35:11+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=db11770718c61f9ee3d5fcd703c5c0c7c05227ca'/>
<id>db11770718c61f9ee3d5fcd703c5c0c7c05227ca</id>
<content type='text'>
We now use a shebang of: #!/usr/bin/env rspec

This enables the direct execution of spec tests again, which was lost earlier
during the transition to more directly using the rspec2 runtime environment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We now use a shebang of: #!/usr/bin/env rspec

This enables the direct execution of spec tests again, which was lost earlier
during the transition to more directly using the rspec2 runtime environment.
</pre>
</div>
</content>
</entry>
<entry>
<title>maint: use FileUtil to remove files, not exec</title>
<updated>2011-04-08T22:17:55+00:00</updated>
<author>
<name>Daniel Pittman</name>
<email>daniel@puppetlabs.com</email>
</author>
<published>2011-04-08T20:57:31+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=f9a2ffd53054b67924790b0386cf74435497c3f1'/>
<id>f9a2ffd53054b67924790b0386cf74435497c3f1</id>
<content type='text'>
We used to shell out to chmod and rm to clean up temporary files; this lead to
the cleanup method here being one of the largest consumers of walltime.
Replacing that with FileUtil calls is as, or more, secure, and performs
sufficiently well that we can just delegate.

Reviewed-By: Matt Robinson &lt;matt@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We used to shell out to chmod and rm to clean up temporary files; this lead to
the cleanup method here being one of the largest consumers of walltime.
Replacing that with FileUtil calls is as, or more, secure, and performs
sufficiently well that we can just delegate.

Reviewed-By: Matt Robinson &lt;matt@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '2.6.next' into next</title>
<updated>2011-03-23T21:32:59+00:00</updated>
<author>
<name>Max Martin</name>
<email>max@puppetlabs.com</email>
</author>
<published>2011-03-23T21:32:59+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=66d0b16c8a0a55dd79b1b0f0e639f107e552d9ab'/>
<id>66d0b16c8a0a55dd79b1b0f0e639f107e552d9ab</id>
<content type='text'>
* 2.6.next:
  Fixed #6562 - Minor kick documentation fix
  (#6658) Propagate ENC connection errors to the agent
  (#4884) Remove typo from spec test
  (#4884) Modify tests to pass on non-OS X systems
  (#4884) Revise new exec tests, add a few more
  (#4884) Add an shell provider for execs
  (#4884) Fix Test::Unit exec tests
  (#4884) Break the exec type out to have a posix provider
  (#4884) Add consistent path validation and behavior
  (#4884) Add expand_path to requiring the spec_helper
  (#4884) Autorequire shared behaviors and method to silence warnings
  (#4884) Fix whitespace
  (#4884) Get rid of open3 require since it wasn't being used
  (#5814) Improved cron type specs
  (#5814) cron_spec shouldn't depend on cron provider

Manually Resolved Conflicts:
	lib/puppet/util/command_line/puppetrun
	spec/spec_helper.rb
	spec/unit/type/exec_spec.rb
	spec/unit/type_spec.rb
	test/ral/type/exec.rb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 2.6.next:
  Fixed #6562 - Minor kick documentation fix
  (#6658) Propagate ENC connection errors to the agent
  (#4884) Remove typo from spec test
  (#4884) Modify tests to pass on non-OS X systems
  (#4884) Revise new exec tests, add a few more
  (#4884) Add an shell provider for execs
  (#4884) Fix Test::Unit exec tests
  (#4884) Break the exec type out to have a posix provider
  (#4884) Add consistent path validation and behavior
  (#4884) Add expand_path to requiring the spec_helper
  (#4884) Autorequire shared behaviors and method to silence warnings
  (#4884) Fix whitespace
  (#4884) Get rid of open3 require since it wasn't being used
  (#5814) Improved cron type specs
  (#5814) cron_spec shouldn't depend on cron provider

Manually Resolved Conflicts:
	lib/puppet/util/command_line/puppetrun
	spec/spec_helper.rb
	spec/unit/type/exec_spec.rb
	spec/unit/type_spec.rb
	test/ral/type/exec.rb
</pre>
</div>
</content>
</entry>
<entry>
<title>(#4884) Autorequire shared behaviors and method to silence warnings</title>
<updated>2011-03-15T18:55:58+00:00</updated>
<author>
<name>Daniel Pittman</name>
<email>daniel@rimspace.net</email>
</author>
<published>2011-03-15T18:30:27+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=7ec90576d396392a1005808136842cd8e0bfc961'/>
<id>7ec90576d396392a1005808136842cd8e0bfc961</id>
<content type='text'>
with_verbose_disabled allows you to run tests that muck with constans
without getting spammy warnings.

Reviewed-by: Max Martin and Matt Robinson
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
with_verbose_disabled allows you to run tests that muck with constans
without getting spammy warnings.

Reviewed-by: Max Martin and Matt Robinson
</pre>
</div>
</content>
</entry>
<entry>
<title>(#6582) Don't demand the checkout be named 'puppet'.</title>
<updated>2011-03-04T02:11:57+00:00</updated>
<author>
<name>Daniel Pittman</name>
<email>daniel@rimspace.net</email>
</author>
<published>2011-03-04T02:11:22+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=455d1978c31c56ad95dd8289552c99891d09bdee'/>
<id>455d1978c31c56ad95dd8289552c99891d09bdee</id>
<content type='text'>
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 &lt;paul@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;paul@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>(#6582) move more helper code into methods, out of RSpec#configure</title>
<updated>2011-03-04T00:29:24+00:00</updated>
<author>
<name>Daniel Pittman</name>
<email>daniel@rimspace.net</email>
</author>
<published>2011-03-03T18:35:27+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=f490526726a5f35437cda11652ae9977d89279e5'/>
<id>f490526726a5f35437cda11652ae9977d89279e5</id>
<content type='text'>
We move the tempfile cleanup support off into the module that uses it, which
removes some of the dependency on magic globals from configure.  It still
exists, but is hidden in the same module that uses it, which helps.

Reviewed-By: Nick Lewis &lt;nick@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We move the tempfile cleanup support off into the module that uses it, which
removes some of the dependency on magic globals from configure.  It still
exists, but is hidden in the same module that uses it, which helps.

Reviewed-By: Nick Lewis &lt;nick@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>(#6582) add fixture helper methods to replace unit test code.</title>
<updated>2011-03-04T00:29:07+00:00</updated>
<author>
<name>Daniel Pittman</name>
<email>daniel@rimspace.net</email>
</author>
<published>2011-03-03T05:54:40+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=6b8f1b724d08e62af6fcf6a2ea55d72b74876de3'/>
<id>6b8f1b724d08e62af6fcf6a2ea55d72b74876de3</id>
<content type='text'>
We validate that fixtures exist, when requested, or that they match something
when they use a glob.  This catches internal errors where we don't match any
fixtures with a glob; this can reveal problems that would otherwise avoid all
assertions and result in internal failures.

The code is hidden out in a module, included in the main RSpec namespace.
This doesn't clean up the API any, but it isolates the code more effectively
and keeps the configuration file cleaner.

Reviewed-By: Nick Lewis &lt;nick@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We validate that fixtures exist, when requested, or that they match something
when they use a glob.  This catches internal errors where we don't match any
fixtures with a glob; this can reveal problems that would otherwise avoid all
assertions and result in internal failures.

The code is hidden out in a module, included in the main RSpec namespace.
This doesn't clean up the API any, but it isolates the code more effectively
and keeps the configuration file cleaner.

Reviewed-By: Nick Lewis &lt;nick@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
