summaryrefslogtreecommitdiff
path: root/spec/unit/util/network_device/config_spec.rb
AgeCommit message (Collapse)AuthorFilesLines
2013-04-25Refactor how files are watchedNick Lewis1-64/+26
LoadedFile is now WatchedFile (since it has nothing to do with loading files, only with telling when they change), and some of its internal variables have been renamed for clarity. Also added a FileWatcher class whose entire purpose is to track a set of LoadedFiles in aggregate. This is now used by TypeCollection in place of its own hash. Puppet::FileServing::Configuration::Parser and Puppet::Util::NetworkDevice::Config were inheriting LoadedFile, simply for its changed? method, even though neither of them really has file properties. Now they wrap a WatchedFile instance instead.
2013-02-07Add the debug parameter in device.confGuillaume Rose1-0/+14
2012-09-26(Maint) Remove rspec from shebang lineJeff McCune1-1/+1
Without this patch Ruby 1.9 is still complaining loudly about trying to parse the spec files. The previous attempt to clean up this problem in edc3ddf works for Ruby 1.8 but not 1.9. I'd prefer to remove the shebang lines entirely, but doing so will cause encoding errors in Ruby 1.9. This patch strives for a happy middle ground of convincing Ruby it is actually working with Ruby while not confusing it to think it should exec() to rspec. This patch is the result of the following command run against the source tree: find spec -type f -print0 | \ xargs -0 perl -pl -i -e 's,^\#\!\s?/(.*)rspec,\#! /usr/bin/env ruby,'
2012-07-02(maint) Standardize on /usr/bin/env ruby -S rspecJeff McCune1-1/+1
Without this patch some spec files are using `ruby -S rspec` and others are using `rspec`. We should standardize on a single form of the interpreter used for spec files. `ruby -S rspec` is the best choice because it correctly informs editors such as Vim with Syntastic that the file is a Ruby file rather than an Rspec file.
2011-09-14Fix #9164 - allow '-' in device certificate namesBrice Figureau1-0/+7
The regex was a little bit too strict and disallowed certnames containing a dash. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
2011-08-19Fix tests with "relative" paths on WindowsJosh Cooper1-3/+5
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 <jacob@puppetlabs.com> (cherry picked from commit 462a95e3d077b1915a919399b846068816c84583) Conflicts: spec/unit/parser/functions/extlookup_spec.rb
2011-05-17maint: fix spec_helper inclusions again.Daniel Pittman1-4/+3
We got rid of the '../../spec_helper' style requires, but a few of them snuck back in in recent changes. This purges them out, replaced with the header: #!/usr/bin/env rspec require 'spec_helper' Reviewed-By: Nick Lewis <nick@puppetlabs.com>
2011-04-18Merge remote-tracking branch 'community/feature/puppet-device' into 2.7.xPieter van de Bruggen1-0/+102
Reviewed-By: Mike Stahnke