lib/given_filesystem.rb in given_filesystem-0.1.1 vs lib/given_filesystem.rb in given_filesystem-0.1.2
- old
+ new
@@ -1,6 +1,6 @@
-# Copyright (c) 2014 Cornelius Schumacher <schumacher@kde.org>
+# Copyright (c) 2014-2015 Cornelius Schumacher <schumacher@kde.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@@ -52,11 +52,14 @@
create_random_base_path unless path_has_base?
FileUtils.mkdir_p path
@path_elements.push to
+
+ created_path = path
FileUtils.cp_r test_data_path(from), path
- path
+ @path_elements.pop
+ created_path
end
def file file_name = nil, options = {}
create_random_base_path unless path_has_base?