rapid-app 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. data/.gitignore +6 -0
  2. data/.rspec +2 -0
  3. data/Gemfile +11 -0
  4. data/Rakefile +4 -0
  5. data/lib/rapid/app/settings.rb +259 -0
  6. data/lib/rapid/app/skeleton.rb +213 -0
  7. data/lib/rapid/app/version.rb +5 -0
  8. data/lib/rapid/app.rb +13 -0
  9. data/lib/rapid-app.rb +5 -0
  10. data/rapid-app.gemspec +33 -0
  11. data/spec/rapid/app/skeleton_spec.rb +50 -0
  12. data/spec/rapid/app_spec.rb +12 -0
  13. data/spec/spec_helper.rb +12 -0
  14. data/spec/support/more_string_matchers.rb +21 -0
  15. data/spec/support/rapid.rb +1 -0
  16. data/spec/templates/app/controllers/application_controller_spec.rb +32 -0
  17. data/spec/templates/app/helpers/application_helper_spec.rb +32 -0
  18. data/spec/templates/app/mailers/test_mailer_spec.rb +22 -0
  19. data/spec/templates/app/views/test_mailer/test_email.text.erb_spec.rb +36 -0
  20. data/spec/templates/config/application_spec.rb +168 -0
  21. data/spec/templates/config/boot_spec.rb +17 -0
  22. data/spec/templates/config/cucumber.yml_spec.rb +22 -0
  23. data/spec/templates/config/deploy/production_spec.rb +155 -0
  24. data/spec/templates/config/deploy_spec.rb +156 -0
  25. data/spec/templates/config/environment_spec.rb +22 -0
  26. data/spec/templates/config/environments/development_spec.rb +50 -0
  27. data/spec/templates/config/environments/production_spec.rb +50 -0
  28. data/spec/templates/config/environments/test_spec.rb +50 -0
  29. data/spec/templates/config/initializers/airbrake_spec.rb +70 -0
  30. data/spec/templates/config/initializers/backtrace_silencers_spec.rb +17 -0
  31. data/spec/templates/config/initializers/email_spec.rb +106 -0
  32. data/spec/templates/config/initializers/mime_types_spec.rb +17 -0
  33. data/spec/templates/config/initializers/secret_token_spec.rb +36 -0
  34. data/spec/templates/config/initializers/session_store_spec.rb +36 -0
  35. data/spec/templates/config/initializers/wrap_parameters_spec.rb +17 -0
  36. data/spec/templates/config/roodi.yml_spec.rb +92 -0
  37. data/spec/templates/config/routes_spec.rb +36 -0
  38. data/spec/templates/config/schedule_spec.rb +22 -0
  39. data/spec/templates/config.ru_spec.rb +22 -0
  40. data/spec/templates/db/migrate/create_jobs_spec.rb +17 -0
  41. data/spec/templates/features/step_definitions/email_steps_spec.rb +17 -0
  42. data/spec/templates/features/step_definitions/web_steps/browsing_steps_spec.rb +17 -0
  43. data/spec/templates/features/step_definitions/web_steps/debug_steps_spec.rb +17 -0
  44. data/spec/templates/features/step_definitions/web_steps/form_steps_spec.rb +17 -0
  45. data/spec/templates/features/step_definitions/web_steps/step_scoper_spec.rb +17 -0
  46. data/spec/templates/features/support/email_spec.rb +17 -0
  47. data/spec/templates/features/support/env_spec.rb +56 -0
  48. data/spec/templates/features/support/paths_spec.rb +22 -0
  49. data/spec/templates/features/support/selectors_spec.rb +22 -0
  50. data/spec/templates/features/support/with_scope_spec.rb +17 -0
  51. data/spec/templates/lib/tasks/cucumber.rake_spec.rb +17 -0
  52. data/spec/templates/lib/tasks/test.rake_spec.rb +147 -0
  53. data/spec/templates/lib/tasks/test_mailer.rake_spec.rb +17 -0
  54. data/spec/templates/rspec_spec.rb +17 -0
  55. data/spec/templates/script/delayed_job_spec.rb +17 -0
  56. data/spec/templates/script/rails_spec.rb +17 -0
  57. data/spec/templates/spec/factories_spec.rb +27 -0
  58. data/spec/templates/spec/spec_helper_spec.rb +56 -0
  59. data/spec/templates/test/test_helper_spec.rb +17 -0
  60. data/templates/app/controllers/application_controller.rb +3 -0
  61. data/templates/app/helpers/application_helper.rb +2 -0
  62. data/templates/app/mailers/test_mailer.rb +7 -0
  63. data/templates/app/views/test_mailer/test_email.text.erb +4 -0
  64. data/templates/config/application.rb +32 -0
  65. data/templates/config/boot.rb +6 -0
  66. data/templates/config/cucumber.yml +8 -0
  67. data/templates/config/deploy/production.rb +37 -0
  68. data/templates/config/deploy.rb +43 -0
  69. data/templates/config/environment.rb +5 -0
  70. data/templates/config/environments/development.rb +35 -0
  71. data/templates/config/environments/production.rb +64 -0
  72. data/templates/config/environments/test.rb +46 -0
  73. data/templates/config/initializers/airbrake.rb +9 -0
  74. data/templates/config/initializers/backtrace_silencers.rb +7 -0
  75. data/templates/config/initializers/email.rb +10 -0
  76. data/templates/config/initializers/mime_types.rb +5 -0
  77. data/templates/config/initializers/secret_token.rb +7 -0
  78. data/templates/config/initializers/session_store.rb +8 -0
  79. data/templates/config/initializers/wrap_parameters.rb +14 -0
  80. data/templates/config/roodi.yml +13 -0
  81. data/templates/config/routes.rb +3 -0
  82. data/templates/config/schedule.rb +1 -0
  83. data/templates/config.ru +4 -0
  84. data/templates/db/migrate/create_jobs.rb +22 -0
  85. data/templates/features/step_definitions/email_steps.rb +194 -0
  86. data/templates/features/step_definitions/web_steps/browsing_steps.rb +82 -0
  87. data/templates/features/step_definitions/web_steps/debug_steps.rb +3 -0
  88. data/templates/features/step_definitions/web_steps/form_steps.rb +210 -0
  89. data/templates/features/step_definitions/web_steps/step_scoper.rb +9 -0
  90. data/templates/features/support/email.rb +2 -0
  91. data/templates/features/support/env.rb +55 -0
  92. data/templates/features/support/paths.rb +27 -0
  93. data/templates/features/support/selectors.rb +24 -0
  94. data/templates/features/support/with_scope.rb +6 -0
  95. data/templates/lib/tasks/cucumber.rake +65 -0
  96. data/templates/lib/tasks/test.rake +49 -0
  97. data/templates/lib/tasks/test_mailer.rake +10 -0
  98. data/templates/rspec +2 -0
  99. data/templates/script/delayed_job +5 -0
  100. data/templates/script/rails +6 -0
  101. data/templates/spec/factories.rb +1 -0
  102. data/templates/spec/spec_helper.rb +47 -0
  103. data/templates/test/test_helper.rb +13 -0
  104. metadata +316 -0
@@ -0,0 +1,50 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
+
3
+ describe "templates/config/environments/development.rb" do
4
+
5
+ include Rapid::Spec::Template
6
+ template_spec __FILE__
7
+
8
+ describe "module_name" do
9
+
10
+ it "should push" do
11
+ push 'name' => 'hello_world'
12
+ @result.should include %(HelloWorld::Application.configure do\n)
13
+ end
14
+
15
+ it "should pull" do
16
+ pull 'name' => 'hello_world'
17
+ @result['module_name'].should == %(HelloWorld)
18
+ end
19
+
20
+ end
21
+
22
+ describe "development.domain" do
23
+
24
+ it "should push" do
25
+ push 'development.domain' => 'www.example.com'
26
+ @result.should end_with %(config.assets.debug = true\n\n config.action_mailer.default_url_options = { :host => "www.example.com" }\nend\n)
27
+ end
28
+
29
+ it "should pull" do
30
+ pull 'development.domain' => 'www.example.com'
31
+ @result['development.domain'].should == %(www.example.com)
32
+ end
33
+
34
+ end
35
+
36
+ describe "development.port" do
37
+
38
+ it "should push" do
39
+ push 'development.domain' => 'www.example.com', 'development.port' => 8080
40
+ @result.should include %(config.action_mailer.default_url_options = { :host => "www.example.com", :port => 8080 }\n)
41
+ end
42
+
43
+ it "should pull" do
44
+ pull 'development.domain' => 'www.example.com', 'development.port' => 8080
45
+ @result['development.port'].should == %(8080)
46
+ end
47
+
48
+ end
49
+
50
+ end
@@ -0,0 +1,50 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
+
3
+ describe "templates/config/environments/production.rb" do
4
+
5
+ include Rapid::Spec::Template
6
+ template_spec __FILE__
7
+
8
+ describe "module_name" do
9
+
10
+ it "should push" do
11
+ push 'name' => 'hello_world'
12
+ @result.should include %(HelloWorld::Application.configure do\n)
13
+ end
14
+
15
+ it "should pull" do
16
+ pull 'name' => 'hello_world'
17
+ @result['module_name'].should == %(HelloWorld)
18
+ end
19
+
20
+ end
21
+
22
+ describe "production.domain" do
23
+
24
+ it "should push" do
25
+ push 'production.domain' => 'www.example.com'
26
+ @result.should end_with %(config.active_support.deprecation = :notify\n\n config.action_mailer.default_url_options = { :host => "www.example.com" }\nend\n)
27
+ end
28
+
29
+ it "should pull" do
30
+ pull 'production.domain' => 'www.example.com'
31
+ @result['production.domain'].should == %(www.example.com)
32
+ end
33
+
34
+ end
35
+
36
+ describe "production.port" do
37
+
38
+ it "should push" do
39
+ push 'production.domain' => 'www.example.com', 'production.port' => 8080
40
+ @result.should include %(config.action_mailer.default_url_options = { :host => "www.example.com", :port => 8080 }\n)
41
+ end
42
+
43
+ it "should pull" do
44
+ pull 'production.domain' => 'www.example.com', 'production.port' => 8080
45
+ @result['production.port'].should == %(8080)
46
+ end
47
+
48
+ end
49
+
50
+ end
@@ -0,0 +1,50 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
+
3
+ describe "templates/config/environments/test.rb" do
4
+
5
+ include Rapid::Spec::Template
6
+ template_spec __FILE__
7
+
8
+ describe "module_name" do
9
+
10
+ it "should push" do
11
+ push 'name' => 'hello_world'
12
+ @result.should include %(HelloWorld::Application.configure do\n)
13
+ end
14
+
15
+ it "should pull" do
16
+ pull 'name' => 'hello_world'
17
+ @result['module_name'].should == %(HelloWorld)
18
+ end
19
+
20
+ end
21
+
22
+ describe "test.domain" do
23
+
24
+ it "should push" do
25
+ push 'test.domain' => 'www.example.com'
26
+ @result.should include %(config.action_mailer.default_url_options = { :host => "www.example.com" }\n)
27
+ end
28
+
29
+ it "should pull" do
30
+ pull 'test.domain' => 'www.example.com'
31
+ @result['test.domain'].should == %(www.example.com)
32
+ end
33
+
34
+ end
35
+
36
+ describe "test.port" do
37
+
38
+ it "should push" do
39
+ push 'test.domain' => 'www.example.com', 'test.port' => 8080
40
+ @result.should include %(config.action_mailer.default_url_options = { :host => "www.example.com", :port => 8080 }\n)
41
+ end
42
+
43
+ it "should pull" do
44
+ pull 'test.domain' => 'www.example.com', 'test.port' => 8080
45
+ @result['test.port'].should == %(8080)
46
+ end
47
+
48
+ end
49
+
50
+ end
@@ -0,0 +1,70 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
+
3
+ describe "templates/config/initializers/airbrake.rb" do
4
+
5
+ include Rapid::Spec::Template
6
+ template_spec __FILE__
7
+
8
+ describe "exceptions.airbrake.api_key" do
9
+
10
+ it "should push" do
11
+ push 'exceptions.airbrake.api_key' => '123'
12
+ @result.should include %(config.api_key = "123"\n)
13
+ end
14
+
15
+ it "should pull" do
16
+ pull 'exceptions.airbrake.api_key' => '123'
17
+ @result['exceptions.airbrake.api_key'].should == %(123)
18
+ end
19
+
20
+ end
21
+
22
+ describe "exceptions.airbrake.host" do
23
+
24
+ it "should push" do
25
+ push 'exceptions.airbrake.host' => 'www.example.com'
26
+ @result.should include %(config.host = "www.example.com")
27
+ end
28
+
29
+ it "should push blank" do
30
+ push
31
+ @result.should_not include %(config.host)
32
+ end
33
+
34
+ it "should pull" do
35
+ pull 'exceptions.airbrake.host' => 'www.example.com'
36
+ @result['exceptions.airbrake.host'].should == %(www.example.com)
37
+ end
38
+
39
+ it "should pull blank" do
40
+ pull 'exceptions.airbrake.host' => 'www.example.com'
41
+ @result['exceptions.airbrake.host'].should == 'www.example.com'
42
+ end
43
+
44
+ end
45
+
46
+ describe "exceptions.airbrake.secure" do
47
+
48
+ it "should push false" do
49
+ push 'exceptions.airbrake.secure' => false
50
+ @result.should include %(config.secure = false\n)
51
+ end
52
+
53
+ it "should push true" do
54
+ push 'exceptions.airbrake.secure' => true
55
+ @result.should_not include %(config.secure)
56
+ end
57
+
58
+ it "should pull false" do
59
+ pull 'exceptions.airbrake.secure' => false
60
+ @result['exceptions.airbrake.secure'].should == false
61
+ end
62
+
63
+ it "should pull true" do
64
+ pull 'exceptions.airbrake.secure' => true
65
+ @result['exceptions.airbrake.secure'].should == true
66
+ end
67
+
68
+ end
69
+
70
+ end
@@ -0,0 +1,17 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
+
3
+ describe "templates/config/initializers/backtrace_silencers.rb" do
4
+
5
+ include Rapid::Spec::Template
6
+ template_spec __FILE__
7
+
8
+ it "should push" do
9
+ push
10
+ @result.should include %(# Rails.backtrace_cleaner.remove_silencers!\n)
11
+ end
12
+
13
+ it "should pull" do
14
+ pull
15
+ end
16
+
17
+ end
@@ -0,0 +1,106 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
+
3
+ describe "templates/config/initializers/email.rb" do
4
+
5
+ include Rapid::Spec::Template
6
+ template_spec __FILE__
7
+
8
+ describe "email.smtp.address" do
9
+
10
+ it "should push" do
11
+ push 'email.smtp.address' => 'smtp.gmail.com'
12
+ @result.should include %(:address => "smtp.gmail.com",\n)
13
+ end
14
+
15
+ it "should pull" do
16
+ pull 'email.smtp.address' => 'smtp.gmail.com'
17
+ @result['email.smtp.address'].should == %(smtp.gmail.com)
18
+ end
19
+
20
+ end
21
+
22
+ describe "email.smtp.port" do
23
+
24
+ it "should push" do
25
+ push 'email.smtp.port' => '80'
26
+ @result.should include %(:port => 80,\n)
27
+ end
28
+
29
+ it "should pull" do
30
+ pull 'email.smtp.port' => '80'
31
+ @result['email.smtp.port'].should == %(80)
32
+ end
33
+
34
+ end
35
+
36
+ describe "email.smtp.authentication" do
37
+
38
+ it "should push" do
39
+ push 'email.smtp.authentication' => 'plain'
40
+ @result.should include %(:authentication => :plain,\n)
41
+ end
42
+
43
+ it "should pull" do
44
+ pull 'email.smtp.authentication' => 'plain'
45
+ @result['email.smtp.authentication'].should == %(plain)
46
+ end
47
+
48
+ end
49
+
50
+ describe "email.smtp.tls" do
51
+
52
+ it "should push" do
53
+ push 'email.smtp.tls' => true
54
+ @result.should include %(:enable_starttls_auto => true,\n)
55
+ end
56
+
57
+ it "should pull" do
58
+ pull 'email.smtp.tls' => true
59
+ @result['email.smtp.tls'].should == %(true)
60
+ end
61
+
62
+ end
63
+
64
+ describe "email.smtp.domain" do
65
+
66
+ it "should push" do
67
+ push 'email.smtp.domain' => 'www.example.com'
68
+ @result.should include %(:domain => "www.example.com",\n)
69
+ end
70
+
71
+ it "should pull" do
72
+ pull 'email.smtp.domain' => 'www.example.com'
73
+ @result['email.smtp.domain'].should == %(www.example.com)
74
+ end
75
+
76
+ end
77
+
78
+ describe "email.smtp.username" do
79
+
80
+ it "should push" do
81
+ push 'email.smtp.username' => 'jim@test.com'
82
+ @result.should include %(:user_name => "jim@test.com",\n)
83
+ end
84
+
85
+ it "should pull" do
86
+ pull 'email.smtp.username' => 'jim@test.com'
87
+ @result['email.smtp.username'].should == %(jim@test.com)
88
+ end
89
+
90
+ end
91
+
92
+ describe "email.smtp.password" do
93
+
94
+ it "should push" do
95
+ push 'email.smtp.password' => 'asdf'
96
+ @result.should include %(:password => "asdf"\n)
97
+ end
98
+
99
+ it "should pull" do
100
+ pull 'email.smtp.password' => 'asdf'
101
+ @result['email.smtp.password'].should == %(asdf)
102
+ end
103
+
104
+ end
105
+
106
+ end
@@ -0,0 +1,17 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
+
3
+ describe "templates/config/initializers/mime_types.rb" do
4
+
5
+ include Rapid::Spec::Template
6
+ template_spec __FILE__
7
+
8
+ it "should push" do
9
+ push
10
+ @result.should include %(# Mime::Type.register "text/richtext", :rtf\n)
11
+ end
12
+
13
+ it "should pull" do
14
+ pull
15
+ end
16
+
17
+ end
@@ -0,0 +1,36 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
+
3
+ describe "templates/config/initializers/secret_token.rb" do
4
+
5
+ include Rapid::Spec::Template
6
+ template_spec __FILE__
7
+
8
+ describe "module_name" do
9
+
10
+ it "should push" do
11
+ push 'name' => 'hello_world'
12
+ @result.should include %(HelloWorld::Application)
13
+ end
14
+
15
+ it "should pull" do
16
+ pull 'name' => 'hello_world'
17
+ @result['module_name'].should == %(HelloWorld)
18
+ end
19
+
20
+ end
21
+
22
+ describe "secret_token" do
23
+
24
+ it "should push" do
25
+ push 'secret_token' => '123'
26
+ @result.should include %(::Application.config.secret_token = '123')
27
+ end
28
+
29
+ it "should pull" do
30
+ pull 'secret_token' => '123'
31
+ @result['secret_token'].should == %(123)
32
+ end
33
+
34
+ end
35
+
36
+ end
@@ -0,0 +1,36 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
+
3
+ describe "templates/config/initializers/session_store.rb" do
4
+
5
+ include Rapid::Spec::Template
6
+ template_spec __FILE__
7
+
8
+ describe "module_name" do
9
+
10
+ it "should push" do
11
+ push 'name' => 'hello_world'
12
+ @result.should include %(HelloWorld::Application)
13
+ end
14
+
15
+ it "should pull" do
16
+ pull 'name' => 'hello_world'
17
+ @result['module_name'].should == %(HelloWorld)
18
+ end
19
+
20
+ end
21
+
22
+ describe "secret_token" do
23
+
24
+ it "should push" do
25
+ push 'session_cookie_name' => '_hello_world_session'
26
+ @result.should include %(::Application.config.session_store :cookie_store, :key => '_hello_world_session')
27
+ end
28
+
29
+ it "should pull" do
30
+ pull 'session_cookie_name' => '_hello_world_session'
31
+ @result['session_cookie_name'].should == %(_hello_world_session)
32
+ end
33
+
34
+ end
35
+
36
+ end
@@ -0,0 +1,17 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
+
3
+ describe "templates/config/initializers/wrap_parameters.rb" do
4
+
5
+ include Rapid::Spec::Template
6
+ template_spec __FILE__
7
+
8
+ it "should push" do
9
+ push
10
+ @result.should include %(ActiveSupport.on_load(:action_controller) do\n)
11
+ end
12
+
13
+ it "should pull" do
14
+ pull
15
+ end
16
+
17
+ end
@@ -0,0 +1,92 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
+
3
+ describe "templates/config/roodi.yml" do
4
+
5
+ include Rapid::Spec::Template
6
+ template_spec __FILE__
7
+
8
+ describe "test.roodi.klass.lines.max" do
9
+
10
+ it "should push" do
11
+ push 'test.roodi.klass.lines.max' => "30"
12
+ @result.should include %(ClassLineCountCheck: { line_count: 30 })
13
+ end
14
+
15
+ it "should pull" do
16
+ pull 'test.roodi.klass.lines.max' => "30"
17
+ @result['test.roodi.klass.lines.max'].should == "30"
18
+ end
19
+
20
+ end
21
+
22
+ describe "test.roodi.block.complexity" do
23
+
24
+ it "should push" do
25
+ push 'test.roodi.block.complexity' => "30"
26
+ @result.should include %(CyclomaticComplexityBlockCheck: { complexity: 30 })
27
+ end
28
+
29
+ it "should pull" do
30
+ pull 'test.roodi.block.complexity' => "30"
31
+ @result['test.roodi.block.complexity'].should == "30"
32
+ end
33
+
34
+ end
35
+
36
+ describe "test.roodi.method.complexity" do
37
+
38
+ it "should push" do
39
+ push 'test.roodi.method.complexity' => "30"
40
+ @result.should include %(CyclomaticComplexityMethodCheck: { complexity: 30 })
41
+ end
42
+
43
+ it "should pull" do
44
+ pull 'test.roodi.method.complexity' => "30"
45
+ @result['test.roodi.method.complexity'].should == "30"
46
+ end
47
+
48
+ end
49
+
50
+ describe "test.roodi.method.lines.max" do
51
+
52
+ it "should push" do
53
+ push 'test.roodi.method.lines.max' => "30"
54
+ @result.should include %(MethodLineCountCheck: { line_count: 30 })
55
+ end
56
+
57
+ it "should pull" do
58
+ pull 'test.roodi.method.lines.max' => "30"
59
+ @result['test.roodi.method.lines.max'].should == "30"
60
+ end
61
+
62
+ end
63
+
64
+ describe "test.roodi.module.lines.max" do
65
+
66
+ it "should push" do
67
+ push 'test.roodi.module.lines.max' => "30"
68
+ @result.should include %(ModuleLineCountCheck: { line_count: 30 })
69
+ end
70
+
71
+ it "should pull" do
72
+ pull 'test.roodi.module.lines.max' => "30"
73
+ @result['test.roodi.module.lines.max'].should == "30"
74
+ end
75
+
76
+ end
77
+
78
+ describe "test.roodi.parameters.max" do
79
+
80
+ it "should push" do
81
+ push 'test.roodi.parameters.max' => "5"
82
+ @result.should include %(ParameterNumberCheck: { parameter_count: 5 })
83
+ end
84
+
85
+ it "should pull" do
86
+ pull 'test.roodi.parameters.max' => "5"
87
+ @result['test.roodi.parameters.max'].should == "5"
88
+ end
89
+
90
+ end
91
+
92
+ end
@@ -0,0 +1,36 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
+
3
+ describe "templates/config/routes.rb" do
4
+
5
+ include Rapid::Spec::Template
6
+ template_spec __FILE__
7
+
8
+ describe "module_name" do
9
+
10
+ it "should push" do
11
+ push 'name' => "hello_world"
12
+ @result.should include %(HelloWorld::Application.routes.draw do)
13
+ end
14
+
15
+ it "should pull" do
16
+ pull 'name' => "hello_world"
17
+ @result['module_name'].should == "HelloWorld"
18
+ end
19
+
20
+ end
21
+
22
+ describe "routes.body" do
23
+
24
+ it "should push content" do
25
+ push 'routes.body' => "get '/foo'"
26
+ @result.should include %(get '/foo')
27
+ end
28
+
29
+ it "should pull content" do
30
+ pull 'routes.body' => "get '/foo'"
31
+ @result['routes.body'].should == "get '/foo'"
32
+ end
33
+
34
+ end
35
+
36
+ end
@@ -0,0 +1,22 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
+
3
+ describe "templates/config/schedule.rb" do
4
+
5
+ include Rapid::Spec::Template
6
+ template_spec __FILE__
7
+
8
+ describe "scheduler.body" do
9
+
10
+ it "should push content" do
11
+ push 'scheduler.body' => "something"
12
+ @result.should include %(something)
13
+ end
14
+
15
+ it "should pull content" do
16
+ pull 'scheduler.body' => "something"
17
+ @result['scheduler.body'].should == "something"
18
+ end
19
+
20
+ end
21
+
22
+ end
@@ -0,0 +1,22 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
+
3
+ describe "templates/config.ru" do
4
+
5
+ include Rapid::Spec::Template
6
+ template_spec __FILE__
7
+
8
+ describe "module_name" do
9
+
10
+ it "should push" do
11
+ push 'name' => "hello_world"
12
+ @result.should include %(run HelloWorld::Application)
13
+ end
14
+
15
+ it "should pull" do
16
+ pull 'name' => "hello_world"
17
+ @result['module_name'].should == "HelloWorld"
18
+ end
19
+
20
+ end
21
+
22
+ end
@@ -0,0 +1,17 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
+
3
+ describe "templates/db/migrate/create_jobs.rb" do
4
+
5
+ include Rapid::Spec::Template
6
+ template_spec __FILE__
7
+
8
+ it "should push" do
9
+ push
10
+ @result.should include %(create_table :delayed_jobs)
11
+ end
12
+
13
+ it "should pull" do
14
+ pull
15
+ end
16
+
17
+ end
@@ -0,0 +1,17 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
+
3
+ describe "templates/features/step_definitions/email_steps.rb" do
4
+
5
+ include Rapid::Spec::Template
6
+ template_spec __FILE__
7
+
8
+ it "should push" do
9
+ push
10
+ @result.should include %(Given /^(?:a clear email queue|no emails have been sent)$/ do)
11
+ end
12
+
13
+ it "should pull" do
14
+ pull
15
+ end
16
+
17
+ end
@@ -0,0 +1,17 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../../../spec_helper')
2
+
3
+ describe "templates/features/step_definitions/web_steps/browsing_steps.rb" do
4
+
5
+ include Rapid::Spec::Template
6
+ template_spec __FILE__
7
+
8
+ it "should push" do
9
+ push
10
+ @result.should include %(Given /^(?:|I )am on (.+)$/ do |page_name|)
11
+ end
12
+
13
+ it "should pull" do
14
+ pull
15
+ end
16
+
17
+ end