Skip to content

Commit f6d2a81

Browse files
author
Takashi Kato
committed
Merge branch 'develop'
2 parents 6a877c7 + 27f35c0 commit f6d2a81

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ describe('clear controller', () => {
7777
});
7878
```
7979

80+
![screenshot](./images/screenshot01.png)
81+
8082
# Configuration
8183

8284
* config.importmap_mocha_style: The style of the test code, `"bdd"` or `"tdd"`. Default is `"bdd"`.

images/screenshot01.png

109 KB
Loading

lib/importmap_mocha/engine.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ class Engine < ::Rails::Engine
3030
app.config.importmap.paths << Engine.root.join('config/importmap.rb') if Rails.application.respond_to?(:importmap)
3131
end
3232

33+
initializer "importmap_mocha.cache_sweeper", before: "importmap.cache_sweeper" do |app|
34+
if app.config.importmap.sweep_cache && !app.config.cache_classes
35+
app.config.importmap.cache_sweepers << Engine.root.join('app/assets/javascripts')
36+
app.config.importmap.cache_sweepers << Engine.root.join('vendor/javascripts')
37+
app.config.importmap.cache_sweepers += Rails.application.config.importmap_mocha_path
38+
end
39+
end
40+
41+
3342
initializer 'importmap_mocha.routes' do
3443
Rails.application.routes.prepend do
3544
scope module: 'importmap_mocha' do

lib/importmap_mocha/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module ImportmapMocha
4-
VERSION = '0.3.2'
4+
VERSION = '0.3.3'
55
end

0 commit comments

Comments
 (0)