Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JustSnow committed Nov 19, 2018
1 parent fe8665b commit 7044a5a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ elsif Gem::Version.new('2.1.0') <= Gem::Version.new(RUBY_VERSION) \
gem 'rest-client'
gem 'resque', '< 2.0'
gem 'sequel', '~> 4.0', '< 4.37'
gem 'shoryuken'
gem 'sidekiq', '~> 3.5.4'
gem 'sinatra', '1.4.5'
gem 'sqlite3'
Expand Down Expand Up @@ -413,6 +414,7 @@ elsif Gem::Version.new('2.2.0') <= Gem::Version.new(RUBY_VERSION) \
gem 'rest-client'
gem 'resque', '< 2.0'
gem 'sequel'
gem 'shoryuken'
gem 'sidekiq'
gem 'sinatra'
gem 'sqlite3'
Expand Down Expand Up @@ -551,6 +553,7 @@ elsif Gem::Version.new('2.3.0') <= Gem::Version.new(RUBY_VERSION) \
gem 'rest-client'
gem 'resque', '< 2.0'
gem 'sequel'
gem 'shoryuken'
gem 'sidekiq'
gem 'sinatra'
gem 'sqlite3'
Expand Down Expand Up @@ -583,6 +586,7 @@ elsif Gem::Version.new('2.4.0') <= Gem::Version.new(RUBY_VERSION)
gem 'rest-client'
gem 'resque', '< 2.0'
gem 'sequel'
gem 'shoryuken'
gem 'sidekiq'
gem 'sinatra'
gem 'sqlite3'
Expand Down
6 changes: 5 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ namespace :spec do
:sidekiq,
:sinatra,
:sucker_punch,
:rest_client
:rest_client,
:shoryuken
].each do |contrib|
RSpec::Core::RakeTask.new(contrib) do |t|
t.pattern = "spec/ddtrace/contrib/#{contrib}/**/*_spec.rb"
Expand Down Expand Up @@ -361,6 +362,7 @@ task :ci do
sh 'bundle exec appraisal contrib rake spec:resque'
sh 'bundle exec appraisal contrib rake spec:rest_client'
sh 'bundle exec appraisal contrib rake spec:sequel'
sh 'bundle exec appraisal contrib rake spec:shoryuken'
# Rails minitests
sh 'bundle exec appraisal contrib rake test:sidekiq'
sh 'bundle exec appraisal rails30-postgres rake test:rails'
Expand Down Expand Up @@ -426,6 +428,7 @@ task :ci do
sh 'bundle exec appraisal contrib rake spec:resque'
sh 'bundle exec appraisal contrib rake spec:rest_client'
sh 'bundle exec appraisal contrib rake spec:sequel'
sh 'bundle exec appraisal contrib rake spec:shoryuken'
# Rails minitests
sh 'bundle exec appraisal contrib rake test:sidekiq'
sh 'bundle exec appraisal rails30-postgres rake test:rails'
Expand Down Expand Up @@ -490,6 +493,7 @@ task :ci do
sh 'bundle exec appraisal contrib rake spec:resque'
sh 'bundle exec appraisal contrib rake spec:rest_client'
sh 'bundle exec appraisal contrib rake spec:sequel'
sh 'bundle exec appraisal contrib rake spec:shoryuken'
# Rails minitests
sh 'bundle exec appraisal contrib rake test:sidekiq'
sh 'bundle exec rake benchmark'
Expand Down
12 changes: 12 additions & 0 deletions spec/ddtrace/contrib/shoryuken/patcher_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require 'spec_helper'
require 'spec/ddtrace/contrib/shoryuken/shoryuken_spec_helper'

RSpec.describe Datadog::Contrib::Shoryuken::Patcher do
describe '.patch' do
subject { Shoryuken.server_middleware.entries.map(&:klass) }

before { described_class.patch }

it { is_expected.to include Datadog::Contrib::Shoryuken::Tracer }
end
end
4 changes: 4 additions & 0 deletions spec/ddtrace/contrib/shoryuken/shoryuken_spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require 'ddtrace'
require 'shoryuken'
require 'ddtrace/contrib/shoryuken/tracer'
require 'ddtrace/contrib/shoryuken/integration'

0 comments on commit 7044a5a

Please sign in to comment.