spec/helper.rb in bearcat-0.9.10 vs spec/helper.rb in bearcat-0.9.12

- old
+ new

@@ -4,12 +4,12 @@ require 'webmock/rspec' require 'json' WebMock.disable_net_connect! -def fixture(file) - File.new(File.join(File.expand_path("../fixtures", __FILE__), file)) +def fixture(*file) + File.new(File.join(File.expand_path("../fixtures", __FILE__), *file)) end def stub_get(client, url) stub_request(:get, "#{client.config[:prefix]}#{url}") end @@ -24,12 +24,12 @@ def stub_delete(client, url) stub_request(:delete, "#{client.config[:prefix]}#{url}") end -def json_response(file) +def json_response(*file) { - :body => fixture(file), + :body => fixture(*file), :headers => { :content_type => 'application/json; charset=utf-8' } } end