Skip to content

Commit ad766a5

Browse files
committed
refactor(): run lib specs with own rake task
1 parent ef769b5 commit ad766a5

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Rakefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,20 @@ RDoc::Task.new(:rdoc) do |rdoc|
1414
rdoc.rdoc_files.include('lib/**/*.rb')
1515
end
1616

17+
task :tests do
18+
system "rspec ./spec/lib"
19+
end
20+
1721
task :sprockets_tests do
1822
system "export SPROCKETS=true; yarn build; rspec ./spec/features"
1923
end
2024

2125
task :webpack_tests do
22-
system "export SPROCKETS=false; rspec"
26+
system "export SPROCKETS=false; rspec ./spec/features"
2327
end
2428

25-
task :tests do
29+
task :all_tests do
30+
system "rake tests"
2631
system "rake sprockets_tests"
2732
system "rake webpack_tests"
2833
end

docs/CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ To run the tests you can do, in the root of the gem:
3636

3737
```
3838
# For running the full setup (sprockets and webpacker)
39+
bundle exec rake all_tests
40+
41+
# For running helper specs (/lib directory)
3942
bundle exec rake tests
4043
4144
# For running with webpacker only

0 commit comments

Comments
 (0)