Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 794b744

Browse files
Add failing test
1 parent 41a8c9f commit 794b744

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

‎spec/internal/config/critical_path_css.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
defaults: &defaults
22
base_url: http://0.0.0.0:9292
3+
manifest_name: application
34
css_path: /test.css
45
routes:
56
- /

‎spec/lib/critical_path_css/rails/config_loader_spec.rb

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,32 @@
6363
end
6464
end
6565

66+
context 'when no paths are specified' do
67+
let(:config_file) {
68+
<<~CONFIG
69+
defaults: &defaults
70+
base_url: http://0.0.0.0:9292
71+
manifest_name: application
72+
routes:
73+
- /
74+
75+
development:
76+
<<: *defaults
77+
78+
test:
79+
<<: *defaults
80+
CONFIG
81+
}
82+
83+
it 'sets css_path with the path' do
84+
expect(subject.config['css_path']).to eq '/app/spec/internal/public/test.css'
85+
end
86+
87+
it 'leaves css_paths empty' do
88+
expect(subject.config['css_paths']).to eq []
89+
end
90+
end
91+
6692
context 'when single css_path and multiple css_paths are both specified' do
6793
let(:config_file) {
6894
<<~CONFIG

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /