-
Notifications
You must be signed in to change notification settings - Fork 5
/
Rakefile
39 lines (28 loc) · 1.02 KB
/
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
36
37
38
#!/usr/bin/env ruby
require 'rake'
require 'rake/testtask'
task :default => [:test]
desc "Run all tests (mocking network calls)"
task :test => ['test-unit'.to_sym, 'test-integration'.to_sym]
desc "Run all tests (with live network calls)"
task 'test-live'.to_sym => ['test-unit-live'.to_sym, 'test-integration-live'.to_sym]
unit_test_file_pattern = 'test/test_unit*'
desc "Run unit tests (mocking network calls)"
Rake::TestTask.new('test-unit') do |t|
t.pattern = unit_test_file_pattern
end
desc "Run unit tests (with live network calls)"
Rake::TestTask.new('test-unit-live') do |t|
t.pattern = unit_test_file_pattern
t.options = '--live'
end
integration_test_file_pattern = 'test/test_integration_script*'
desc "Run integration tests (mocking network calls)"
Rake::TestTask.new('test-integration') do |t|
t.pattern = integration_test_file_pattern
end
desc "Run integration tests (with live network calls)"
Rake::TestTask.new('test-integration-live') do |t|
t.pattern = integration_test_file_pattern
t.options = '--live'
end