summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan McLellan <btm@opscode.com>2012-10-16 10:06:57 -0700
committerBryan McLellan <btm@opscode.com>2012-10-16 10:06:57 -0700
commit4eff1dc80696feb8c06b66fcba59a6c7965efd2f (patch)
tree38d6f90ee2d41becb8dc715b399c989e8fd7922b
parentfe9e3922cb1059a19e0d6924158960cfd6b6941f (diff)
downloadchef-4eff1dc80696feb8c06b66fcba59a6c7965efd2f.tar.gz
Handle GMT and postive time zones in spec test
-rw-r--r--chef/spec/unit/chef_fs/diff_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/chef/spec/unit/chef_fs/diff_spec.rb b/chef/spec/unit/chef_fs/diff_spec.rb
index 1268eee59a..dafff278f8 100644
--- a/chef/spec/unit/chef_fs/diff_spec.rb
+++ b/chef/spec/unit/chef_fs/diff_spec.rb
@@ -82,7 +82,9 @@ describe 'diff' do
it 'Chef::ChefFS::CommandLine.diff(/)' do
results = []
Chef::ChefFS::CommandLine.diff(pattern('/'), a, b, nil, nil) do |diff|
- results << diff.gsub(/\s+\d\d\d\d-\d\d-\d\d\s\d?\d:\d\d:\d\d\.\d{9} -\d\d\d\d/, ' DATE')
+ # Removes the date stamp from the diff and replaces it with ' DATE'
+ # example match: "/dev/null\t2012-10-16 16:15:54.000000000 +0000"
+ results << diff.gsub(/\s+\d\d\d\d-\d\d-\d\d\s\d?\d:\d\d:\d\d\.\d{9} [+-]\d\d\d\d/, ' DATE')
end
results.should =~ [
'diff --knife a/both_dirs/sub_both_files_different b/both_dirs/sub_both_files_different