Sha256: 78ba08c43d579c15d25f2da9379b4aaa05840d32995bc92bab714c9dc77e85d5

Contents?: true

Size: 887 Bytes

Versions: 22

Compression:

Stored size: 887 Bytes

Contents

require 'test_helper'

module Elasticsearch
  module Test
    class <%= @module_namespace.empty? ? @method_name.camelize : @module_namespace.map {|n| n.capitalize}.join + @method_name.camelize %>Test < ::Test::Unit::TestCase

      context "<%= @module_namespace.empty? ? '' : @module_namespace.map {|n| n.capitalize}.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('.') %>
        end

      end

    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
elasticsearch-api-1.1.3 utils/thor/templates/ruby/test.erb
elasticsearch-api-2.0.2 utils/thor/templates/ruby/test.erb
elasticsearch-api-2.0.1 utils/thor/templates/ruby/test.erb
elasticsearch-api-1.1.2 utils/thor/templates/ruby/test.erb
elasticsearch-api-1.1.1 utils/thor/templates/ruby/test.erb
elasticsearch-api-2.0.0 utils/thor/templates/ruby/test.erb
elasticsearch-api-1.1.0 utils/thor/templates/ruby/test.erb
elasticsearch-api-2.0.0.pre utils/thor/templates/ruby/test.erb
elasticsearch-api-1.1.pre utils/thor/templates/ruby/test.erb
elasticsearch-api-1.0.18 utils/thor/templates/ruby/test.erb
elasticsearch-api-1.0.17 utils/thor/templates/ruby/test.erb
elasticsearch-api-1.0.16 utils/thor/templates/ruby/test.erb
elasticsearch-api-1.0.16.pre2 utils/thor/templates/ruby/test.erb
elasticsearch-api-1.0.16.pre utils/thor/templates/ruby/test.erb
elasticsearch-api-1.0.15 utils/thor/templates/ruby/test.erb
elasticsearch-api-1.0.14 utils/thor/templates/ruby/test.erb
elasticsearch-api-1.0.13 utils/thor/templates/ruby/test.erb
elasticsearch-api-1.0.12 utils/thor/templates/ruby/test.erb
elasticsearch-api-1.0.11 utils/thor/templates/ruby/test.erb
elasticsearch-api-1.0.10 utils/thor/templates/ruby/test.erb