-
Notifications
You must be signed in to change notification settings - Fork 1
/
javascript_spec.rb
42 lines (39 loc) · 973 Bytes
/
javascript_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
module Skellington
describe CLI do
let :subject do
described_class.new
end
it 'generates javascript files' do
subject.generate 'dummy_app'
expect('dummy_app/spec/javascripts/support/jasmine.yml').to have_content (
"""
src_files:
- public/js/**/*.js
stylesheets:
- stylesheets/**/*.css
helpers:
- helpers/**/*.js
spec_files:
- '**/*[sS]pec.js'
src_dir:
spec_dir:
spec_helper: spec/javascripts/support/jasmine_helper.rb
boot_dir:
boot_files:
server: 'puma'
random: true
"""
)
expect(File).to exist 'dummy_app/spec/javascripts/support/jasmine_helper.rb'
expect('dummy_app/spec/javascripts/dummy_app_spec.js').to have_content (
"""
describe('DummyApp', function() {
it('knows the truth', function() {
expect(true).toEqual(true)
})
})
"""
)
end
end
end