forked from calatrava/calatrava
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell_spec.rb
54 lines (39 loc) · 1.34 KB
/
shell_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
43
44
45
46
47
48
49
50
51
52
53
54
require 'spec_helper'
describe Calatrava::Shell do
include Aruba::Api
let(:shell) { Calatrava::Shell.new(current_dir) }
before(:each) do
create_dir 'shell/support'
write_file 'shell/support/shell.coffee', ''
write_file 'shell/support/fragment.haml', ''
create_dir 'shell/pages/example'
write_file 'shell/pages/example/page.coffee', ''
write_file 'shell/pages/example/page.haml', ''
create_dir 'shell/stylesheets'
write_file 'shell/stylesheets/shell.css', ''
write_file 'shell/stylesheets/template.sass', ''
end
context 'coffee files' do
subject { shell.coffee_files }
it { should include 'shell/support/shell.coffee' }
end
context 'haml files' do
subject { shell.haml_files }
it { should include 'shell/support/fragment.haml' }
end
context 'css files' do
subject { shell.css_files }
it { should include 'shell/stylesheets/shell.css' }
it { should include 'shell/stylesheets/template.sass' }
end
context 'features' do
subject { shell.features }
it { should have(1).feature }
context 'a single feature' do
subject { shell.features[0] }
it { should include :name => 'example' }
it { should include :coffee => ['shell/pages/example/page.coffee'] }
it { should include :haml => ['shell/pages/example/page.haml'] }
end
end
end