summaryrefslogtreecommitdiff
path: root/spec/unit/data_bag_spec.rb
diff options
context:
space:
mode:
authorIvan Larionov <ivan.larionov@skype.net>2014-06-01 13:13:11 +0400
committerIvan Larionov <ivan.larionov@skype.net>2014-06-01 13:13:11 +0400
commitfe111abd736b3ac254e3bf5e73a18bf28e3656f1 (patch)
treee4acb90a394af2b6998ed8760c556ce6b8b9a77f /spec/unit/data_bag_spec.rb
parent58de779995ec2f3adff739ec5170aedf0366ada2 (diff)
downloadchef-fe111abd736b3ac254e3bf5e73a18bf28e3656f1.tar.gz
[CHEF-3399] Tests: check data_bag_path instead of @paths.
Diffstat (limited to 'spec/unit/data_bag_spec.rb')
-rw-r--r--spec/unit/data_bag_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/unit/data_bag_spec.rb b/spec/unit/data_bag_spec.rb
index a35e3d2aa6..167c1b4134 100644
--- a/spec/unit/data_bag_spec.rb
+++ b/spec/unit/data_bag_spec.rb
@@ -183,7 +183,7 @@ describe Chef::DataBag do
file_dir_stub(path)
item_with_different_content = "{\"id\": \"bar\", \"name\": \"Bob Bar\", \"path\": \"#{path}\"}"
IO.should_receive(:read).with(File.join(path, 'foo/bar.json')).and_return(item_with_different_content)
- if @paths.size == 1
+ if data_bag_path.is_a?(String)
dir_glob_stub(path, [File.join(path, 'foo/bar.json'), File.join(path, 'foo/baz.json')])
item_2_with_different_content = '{"id": "bar", "name": "John Baz"}'
IO.should_receive(:read).with(File.join(path, 'foo/baz.json')).and_return(item_2_with_different_content)