Skip to content

Commit

Permalink
Only run delayed job tests on ruby >= 2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kattrali committed Oct 30, 2017
1 parent 4b8a578 commit 7e18f67
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ group :test, optional: true do
gem 'rdoc'
gem 'pry'
gem 'addressable', '~> 2.3.8'
gem 'delayed_job'
gem 'delayed_job' if RUBY_VERSION >= '2.2.2'
gem 'webmock', RUBY_VERSION <= '1.9.3' ? '2.3.2': '>2.3.2'
end

Expand Down
9 changes: 8 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,18 @@ end
require 'rspec/core'
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec) do |task|
task.rspec_opts = ""
begin
require 'sidekiq/testing'
rescue LoadError
puts "Skipping sidekiq tests, missing dependencies"
task.rspec_opts = "--exclude-pattern **/integrations/sidekiq_spec.rb"
task.rspec_opts << " --exclude-pattern **/integrations/sidekiq_spec.rb"
end
begin
require 'delayed_job'
rescue LoadError
puts "Skipping delayed_job tests, missing dependencies"
task.rspec_opts << " --exclude-pattern **/integrations/delayed_job_spec.rb"
end
end

Expand Down

0 comments on commit 7e18f67

Please sign in to comment.