{"action":"opened","issue":{"url":"https://api.github.com/repos/sethvargo/chefspec/issues/650","labels_url":"https://api.github.com/repos/sethvargo/chefspec/issues/650/labels{/name}","comments_url":"https://api.github.com/repos/sethvargo/chefspec/issues/650/comments","events_url":"https://api.github.com/repos/sethvargo/chefspec/issues/650/events","html_url":"https://github.com/sethvargo/chefspec/issues/650","id":117797490,"number":650,"title":"create_data_bag only works with strings","user":{"login":"kzw","id":1887879,"avatar_url":"https://avatars.githubusercontent.com/u/1887879?v=3","gravatar_id":"","url":"https://api.github.com/users/kzw","html_url":"https://github.com/kzw","followers_url":"https://api.github.com/users/kzw/followers","following_url":"https://api.github.com/users/kzw/following{/other_user}","gists_url":"https://api.github.com/users/kzw/gists{/gist_id}","starred_url":"https://api.github.com/users/kzw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kzw/subscriptions","organizations_url":"https://api.github.com/users/kzw/orgs","repos_url":"https://api.github.com/users/kzw/repos","events_url":"https://api.github.com/users/kzw/events{/privacy}","received_events_url":"https://api.github.com/users/kzw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-19T11:51:51Z","updated_at":"2015-11-19T11:51:51Z","closed_at":null,"body":"Because ServerRunner does not automagically load data_bags (even though SoloRunner does with proper configuration), I am using server.create_data_bag.  But this does not work with all types of data bag.  I am currently work around by stubbing all these data bags.\r\n\r\nI get the following error when I make a databag with items that are lists\r\n\r\n> RuntimeError:\r\n >      set only works with strings: [\"organizations\", \"chef\", \"data\", \"test\", \"item\"] = [1, 2]\r\n\r\nHere is the example used\r\n\r\n> require 'spec_helper'\r\n>\r\n> describe 'serverrunner create databag' do\r\n>  let(:chef_run) do\r\n>    ChefSpec::ServerRunner.new do |node, server|\r\n>      server.create_data_bag('test', {'item'=> [1, 2]})\r\n>    end.converge('recipe[databag-test]')\r\n>  end\r\n\r\n>  it 'does not raise an exception' do\r\n>    expect(chef_run).to_not raise_exception\r\n>  end\r\n> end"}}