-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmerb_stack_spec.rb
60 lines (43 loc) · 1.5 KB
/
merb_stack_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
55
56
57
58
59
60
require 'spec_helper'
describe Merb::Generators::MerbStackGenerator do
describe "templates" do
before do
@generator = Merb::Generators::MerbStackGenerator.new('/tmp', {}, 'testing')
end
it_should_behave_like "named generator"
it_should_behave_like "app generator"
it "should create an Gemfile" do
@generator.should create('/tmp/testing/Gemfile')
end
it "should create an bin/merb" do
@generator.should create('/tmp/testing/bin/merb')
end
it "should create a passenger config file" do
@generator.should create('/tmp/testing/config.ru')
end
it "should create config/init.rb" do
@generator.should create('/tmp/testing/config/init.rb')
end
it "should create config/database.yml" do
@generator.should create('/tmp/testing/config/database.yml')
end
it "should have an application controller" do
@generator.should create('/tmp/testing/app/controllers/application.rb')
end
it "should have an exceptions controller" do
@generator.should create('/tmp/testing/app/controllers/exceptions.rb')
end
it "should have a gitignore file" do
@generator.should create('/tmp/testing/.gitignore')
end
it "should create a number of views"
it "should render templates successfully" do
lambda do
@generator.render!
end.should_not raise_error
end
it "should create an empty lib/tasks directory" do
@generator.should create('/tmp/testing/lib/tasks')
end
end
end