-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathRakefile
More file actions
49 lines (38 loc) · 1.02 KB
/
Rakefile
File metadata and controls
49 lines (38 loc) · 1.02 KB
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
47
48
49
# frozen_string_literal: true
require "bundler/gem_tasks"
require "rake/testtask"
task default: :test
Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/*_test.rb"]
end
Rake::TestTask.new("test:unit") do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/unit/**/*_test.rb"]
end
Rake::TestTask.new("test:integration") do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/integration/**/*_test.rb"]
end
desc "Run all tests with coverage"
task :coverage do
ENV["COVERAGE"] = "true"
Rake::Task["test"].invoke
end
task "clobber" do
puts "Cleanup tmp/*.png"
FileUtils.rm_rf(Dir["./tmp/*"])
end
task "test:benchmark" do
require_relative "scripts/benchmark/find_region_benchmark"
benchmark = Capybara::Screenshot::Diff::Drivers::FindRegionBenchmark.new
puts "For Medium Screen Size: 800x600"
benchmark.for_medium_size_screens
puts ""
puts "*" * 100
puts "For Small Screen Size: 80x60"
benchmark.for_small_images
end