forked from mailgun/mailgun-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
35 lines (29 loc) · 872 Bytes
/
Rakefile
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
require 'bundler/gem_tasks'
require 'rake'
require 'rspec/core/rake_task'
desc 'Build Gem'
task :build do
system 'gem build mailgun.gemspec'
end
desc 'Run unit specs'
RSpec::Core::RakeTask.new('spec:unit') do |t|
t.rspec_opts = %w(--colour --format documentation)
t.pattern = 'spec/unit/*_spec.rb', 'spec/unit/*/*_spec.rb'
end
desc 'Run integration specs'
# Before running integration tests, you need to specify
# a valid API KEY in the spec/spec_helper.rb file.
RSpec::Core::RakeTask.new('spec:integration') do |t|
t.rspec_opts = %w(--colour --format documentation)
t.pattern = 'spec/integration/*_spec.rb'
end
desc 'Run all tests'
RSpec::Core::RakeTask.new('spec:all') do |t|
t.rspec_opts = %w(--colour --format documentation)
t.pattern = 'spec/**/*_spec.rb'
end
task default: 'spec:unit'
task spec: 'spec:unit'
task :console do
sh 'pry --gem'
end