Skip to content

Commit 6f353ce

Browse files
committed
split rspec test between test, benchmark, example
1 parent a8937b2 commit 6f353ce

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

Rakefile

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require 'yard'
1515
require_relative 'lib/serpapi'
1616

1717
desc "run out of box testing using the local gem file pre-release"
18-
task oobt: %i[check readme doc check build install demo]
18+
task oobt: %i[check readme doc build install demo]
1919

2020
desc "execute all the steps except release"
2121
task default: %i[check dependency version readme doc build test oobt]
@@ -31,8 +31,21 @@ YARD::Rake::YardocTask.new(:doc) do |t|
3131
t.stats_options = ['--list-undoc']
3232
end
3333

34+
desc 'validate core client spec files'
3435
RSpec::Core::RakeTask.new(:test) do |t|
35-
t.pattern = Dir.glob('test/*_spec.rb')
36+
t.pattern = Dir.glob('spec/serpapi/client/*_spec.rb') + Dir.glob('spec/serpapi/*_spec.rb')
37+
t.rspec_opts = '--format documentation'
38+
end
39+
40+
desc 'valiate all the examples (comprehensive of tests)'
41+
RSpec::Core::RakeTask.new(:regression) do |t|
42+
t.pattern = Dir.glob('spec/serpapi/client/example/*_spec.rb')
43+
t.rspec_opts = '--format documentation'
44+
end
45+
46+
desc 'run benchmark tests'
47+
RSpec::Core::RakeTask.new(:benchmark) do |t|
48+
t.pattern = Dir.glob('spec/serpapi/client/benchmark/*_spec.rb')
3649
t.rspec_opts = '--format documentation'
3750
end
3851

File renamed without changes.

0 commit comments

Comments
 (0)