File: Rakefile

package info (click to toggle)
ruby-bunny 2.9.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,324 kB
  • sloc: ruby: 9,559; sh: 28; makefile: 6
file content (46 lines) | stat: -rw-r--r-- 1,779 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
require 'rake'
require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:integration) do |t|
  # excludes unit tests as those involve many iterations
  # and sometimes suffer from obscure interference from integration tests (!)
  t.pattern    = ["spec/higher_level_api/integration", "spec/lower_level_api/integration", "spec/issues"].
    map { |dir| Dir.glob(File.join(dir, "**", "*_spec.rb")) }.reduce(&:+) - ["spec/higher_level_api/integration/tls_connection_spec.rb"]

  t.rspec_opts = "--format progress"
end

RSpec::Core::RakeTask.new(:integration_without_recovery) do |t|
  # same as :integration but excludes client connection recovery tests.
  # useful for sanity checking edge RabbitMQ builds, for instance.
  t.pattern    = ["spec/higher_level_api/integration", "spec/lower_level_api/integration", "spec/issues"].
    map { |dir| Dir.glob(File.join(dir, "**", "*_spec.rb")) }.reduce(&:+) -
    ["spec/higher_level_api/integration/tls_connection_spec.rb",
     "spec/higher_level_api/integration/connection_recovery_spec.rb"]

  t.rspec_opts = "--format progress"
end

RSpec::Core::RakeTask.new(:unit) do |t|
  t.pattern    = Dir.glob("spec/unit/**/*_spec.rb")

  t.rspec_opts = "--format progress --backtrace"
end

RSpec::Core::RakeTask.new(:recovery_integration) do |t|
  # otherwise all examples will be skipped
  ENV.delete("CI")
  t.pattern    = ["spec/higher_level_api/integration/connection_recovery_spec.rb"]

  t.rspec_opts = "--format progress --backtrace"
end

RSpec::Core::RakeTask.new(:stress) do |t|
  # excludes unit tests as those involve many iterations
  # and sometimes suffer from obscure interference from integration tests (!)
  t.pattern    = ["spec/stress/**/*_spec.rb"]

  t.rspec_opts = "--format progress"
end

task :default => :integration