Skip to content

Commit ef769b5

Browse files
committed
refactor(): run tests against source files
1 parent 41ed665 commit ef769b5

18 files changed

+16
-61506
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ spec/dummy/log/*.log
77
spec/dummy/tmp/
88
spec/dummy/.sass-cache
99
spec/dummy/public/system
10+
spec/dummy/public/packs-test
11+
spec/dummy/public/packs
1012
.gem
1113
.gemtags
1214
.tags
1315
.tags_sorted_by_file
1416
vendor/bundle
1517
node_modules
16-
src
18+
src

Rakefile

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

17-
task :tests do
18-
system "export SPROCKETS=true; rspec ./spec/features"
17+
task :sprockets_tests do
18+
system "export SPROCKETS=true; yarn build; rspec ./spec/features"
19+
end
20+
21+
task :webpack_tests do
1922
system "export SPROCKETS=false; rspec"
2023
end
2124

25+
task :tests do
26+
system "rake sprockets_tests"
27+
system "rake webpack_tests"
28+
end
29+
2230
Bundler::GemHelper.install_tasks

docs/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ To run the tests you can do, in the root of the gem:
3939
bundle exec rake tests
4040
4141
# For running with webpacker only
42-
bundle exec rspec
42+
bundle exec rake webpack_tests
4343
4444
# For running with sprockets only
45-
export SPROCKETS=true; bundle exec rspec
45+
bundle exec rake sprockets_tests
4646
```
4747

4848
- The addons specs we put them inside `/spec/features`.

spec/dummy/app/javascript/packs/active_admin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
import "../stylesheets/active_admin";
44

55
import "@activeadmin/activeadmin";
6-
import "activeadmin_addons"
6+
import "../../../../../app/javascript/activeadmin_addons/all";

0 commit comments

Comments
 (0)