Skip to content

Commit b74cf03

Browse files
committed
ll
1 parent 1c0b236 commit b74cf03

3 files changed

Lines changed: 16 additions & 13 deletions

File tree

.rspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
--format documentation
22
--color
3-
--pattern 'spec/**/*.rb'
43
--exclude-pattern 'spec/fixtures/**/*.rb'

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ source 'https://rubygems.org'
44
gemspec
55

66
group :development, :test do
7+
gem 'irb' # for yard compatibility
78
gem 'rack', '~> 3.1' # for yard server
89
gem 'rackup', '~> 2.1' # for yard server
910
gem 'rbs', '~> 3.10.0'
11+
gem 'rdoc' # for yard rdoc formatting
12+
gem 'redcarpet' # for yard markdown formatting
1013
gem 'rubocop', '~> 1.81.0', require: false
1114
gem 'steep', '~> 1.10.0'
1215
gem 'webrick', '~> 1.9.1'

Rakefile

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
require 'bundler/gem_tasks'
2+
require 'rspec/core/rake_task'
3+
4+
RSpec::Core::RakeTask.new(:spec)
5+
6+
task default: :spec
27

38
# We don't want to push tags to source control when releasing the gem
49
Rake::Task["release"].clear
@@ -12,24 +17,20 @@ end
1217

1318
## Development
1419

15-
desc "Run normal tests (exclude no_missing_require_* specs)"
16-
task :test_normal, [:skip_tag] do |_, args|
20+
RSpec::Core::RakeTask.new(:test_normal, [:skip_tag]) do |t, args|
1721
skip_tag = args[:skip_tag]
1822

19-
rspec_opts = []
20-
rspec_opts << "--tag '~#{skip_tag}'" if skip_tag
21-
22-
sh "bundle exec rspec --exclude-pattern 'spec/line/bot/line_bot_api_gem_spec.rb' --exclude-pattern 'spec/line/bot/line_bot_gem_spec.rb' #{rspec_opts.join(' ')}"
23+
spec_files = Dir['spec/**/*_spec.rb'] - ['spec/line/bot/line_bot_api_gem_spec.rb', 'spec/line/bot/line_bot_gem_spec.rb', 'spec/shared/no_missing_require_spec.rb']
24+
t.pattern = spec_files.join(',')
25+
t.rspec_opts = skip_tag ? "--tag '~#{skip_tag}'" : nil
2326
end
2427

25-
desc "Test line-bot-api gem spec"
26-
task :test_line_bot_api do
27-
sh "bundle exec rspec --pattern 'spec/line/bot/line_bot_api_gem_spec.rb'"
28+
RSpec::Core::RakeTask.new(:test_line_bot_api) do |t|
29+
t.pattern = 'spec/line/bot/line_bot_api_gem_spec.rb'
2830
end
2931

30-
desc "Test line/bot gem(?) spec"
31-
task :test_line_bot do
32-
sh "bundle exec rspec --pattern 'spec/line/bot/line_bot_gem_spec.rb'"
32+
RSpec::Core::RakeTask.new(:test_line_bot) do |t|
33+
t.pattern = 'spec/line/bot/line_bot_gem_spec.rb'
3334
end
3435

3536
desc "Run all tests in separate processes"

0 commit comments

Comments
 (0)