Sha256: 56ca8d72361eed562077b907680f516dd5d677d44fc6782abcef9daaf6efed2c

Contents?: true

Size: 1.01 KB

Versions: 22

Compression:

Stored size: 1.01 KB

Contents

require 'simplecov'

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
  SimpleCov::Formatter::HTMLFormatter
])

SimpleCov.start do
  add_filter "/spec/"
end

require 'discourse_api'
require 'rspec'
require 'webmock/rspec'

RSpec.configure do |config|
  config.expect_with :rspec do |c|
    c.syntax = :expect
  end
end

WebMock.disable_net_connect!(:allow_localhost => true)

def a_delete(path)
  a_request(:delete, path)
end

def a_get(path)
  a_request(:get, path)
end

def a_post(path)
  a_request(:post, path)
end

def a_put(path)
  a_request(:put, path)
end

def stub_delete(path)
  stub_request(:delete, path)
end

def stub_get(path)
  stub_request(:get, path)
end

def stub_post(path)
  stub_request(:post, path)
end

def stub_put(path)
  stub_request(:put, path)
end

def fixture_path
  File.expand_path("../fixtures", __FILE__)
end

def fixture(file)
  File.new(fixture_path + '/' + file)
end

def escape_params(params)
  params.map do |key, value|
    [CGI.escape(key), value].join('=')
  end.join('&')
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
discourse_api-0.37.0 spec/spec_helper.rb
discourse_api-0.36.0 spec/spec_helper.rb
discourse_api-0.35.0 spec/spec_helper.rb
discourse_api-0.34.0 spec/spec_helper.rb
discourse_api-0.33.0 spec/spec_helper.rb
discourse_api-0.32.0 spec/spec_helper.rb
discourse_api-0.31.0 spec/spec_helper.rb
discourse_api-0.30.0 spec/spec_helper.rb
discourse_api-0.29.0 spec/spec_helper.rb
discourse_api-0.28.1 spec/spec_helper.rb
discourse_api-0.28.0 spec/spec_helper.rb
discourse_api-0.27.0 spec/spec_helper.rb
discourse_api-0.26.0 spec/spec_helper.rb
discourse_api-0.25.0 spec/spec_helper.rb
discourse_api-0.24.0 spec/spec_helper.rb
discourse_api-0.23.1 spec/spec_helper.rb
discourse_api-0.23.0 spec/spec_helper.rb
discourse_api-0.22.0 spec/spec_helper.rb
discourse_api-0.20.1 spec/spec_helper.rb
discourse_api-0.20.0 spec/spec_helper.rb