Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (23 sloc) 0.846 kB
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'shoulda'
class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
#
# Note: You'll currently still have to declare fixtures explicitly in integration tests
# -- they do not yet inherit this setting
fixtures :all
# Add more helper methods to be used by all tests here...
end
Faraday.new(:url => "http://0.0.0.0:9200") do |builder|
builder.request :json
builder.adapter :test do |stub|
resp = {
'hits' => {'hits' => []}
}
stub.get('/gitscm/doc/_search') {[200, {}, JSON.dump(resp)]}
stub.get('/gitscm/book/_search') {[200, {}, JSON.dump(resp)]}
stub.put("/gitscm/book/en---Title-1-Title-2") {[200, {}, "{}"]}
end
end
Jump to Line
Something went wrong with that request. Please try again.