Sha256: 422b763dc9aef205ed3a943714a864a4de7669a9e45e68db325437591e13c0b9
Contents?: true
Size: 1.19 KB
Versions: 25
Compression:
Stored size: 1.19 KB
Contents
# Licensed to Elasticsearch B.V under one or more agreements. # Elasticsearch B.V licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information require 'test_helper' module Elasticsearch module Test class <%= @module_namespace.map {|n| n.capitalize}.map { |n| n == 'Xpack' ? 'XPack' : n }.join('') + @method_name.camelize %>Test < ::Test::Unit::TestCase context "<%= @module_namespace.map {|n| n.capitalize}.map { |n| n == 'Xpack' ? 'XPack' : n }.join(' ') + ': ' %><%= @method_name.humanize %>" do subject { FakeClient.new } should "perform correct request" do subject.expects(:perform_request).with do |method, url, params, body| assert_equal 'FAKE', method assert_equal 'test', url assert_equal Hash.new, params <%= @spec['body'].nil? ? 'assert_nil body' : 'assert_equal Hash.new, body' %> true end.returns(FakeResponse.new) subject.<%= @full_namespace.join('.') %> <%= @spec['url']['parts'].select { |name, info| info['required'] }.keys.map { |d| ":#{d} => 'foo'" }.join(', ') rescue '' %> end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems