email_spec 0.6.6 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. data/History.txt +21 -26
  2. data/README.rdoc +5 -3
  3. data/Rakefile +16 -27
  4. data/examples/rails3_root/Gemfile +17 -0
  5. data/examples/rails3_root/Gemfile.lock +138 -0
  6. data/examples/rails3_root/README +5 -0
  7. data/examples/rails3_root/Rakefile +11 -0
  8. data/examples/rails3_root/app/controllers/application_controller.rb +3 -0
  9. data/examples/rails3_root/app/controllers/welcome_controller.rb +16 -0
  10. data/examples/rails3_root/app/helpers/application_helper.rb +2 -0
  11. data/examples/rails3_root/app/mailers/user_mailer.rb +39 -0
  12. data/examples/{rails_root → rails3_root}/app/models/user.rb +0 -0
  13. data/examples/{rails_root/app/views/user_mailer/attachments.erb → rails3_root/app/views/user_mailer/attachments.html.erb} +0 -0
  14. data/examples/{rails_root/app/views/user_mailer/newsletter.erb → rails3_root/app/views/user_mailer/newsletter.html.erb} +0 -0
  15. data/examples/{rails_root/app/views/user_mailer/signup.erb → rails3_root/app/views/user_mailer/signup.html.erb} +1 -0
  16. data/examples/rails3_root/app/views/user_mailer/signup.text.erb +4 -0
  17. data/examples/{rails_root → rails3_root}/app/views/welcome/attachments.html.erb +0 -0
  18. data/examples/{rails_root → rails3_root}/app/views/welcome/confirm.html.erb +0 -0
  19. data/examples/{rails_root → rails3_root}/app/views/welcome/index.html.erb +1 -1
  20. data/examples/{rails_root → rails3_root}/app/views/welcome/newsletter.html.erb +0 -0
  21. data/examples/{rails_root → rails3_root}/app/views/welcome/signup.html.erb +0 -0
  22. data/examples/{rails_root → rails3_root}/attachments/document.pdf +0 -0
  23. data/examples/{rails_root → rails3_root}/attachments/image.png +0 -0
  24. data/examples/rails3_root/config.ru +4 -0
  25. data/examples/rails3_root/config/application.rb +43 -0
  26. data/examples/rails3_root/config/boot.rb +14 -0
  27. data/examples/rails3_root/config/cucumber.yml +8 -0
  28. data/examples/{rails_root → rails3_root}/config/database.yml +0 -0
  29. data/examples/rails3_root/config/environment.rb +6 -0
  30. data/examples/rails3_root/config/environments/development.rb +20 -0
  31. data/examples/rails3_root/config/environments/production.rb +42 -0
  32. data/examples/rails3_root/config/environments/test.rb +30 -0
  33. data/examples/rails3_root/config/initializers/backtrace_silencers.rb +7 -0
  34. data/examples/rails3_root/config/initializers/cookie_verification_secret.rb +7 -0
  35. data/examples/rails3_root/config/initializers/delayed_job.rb +1 -0
  36. data/examples/{rails_root → rails3_root}/config/initializers/inflections.rb +0 -0
  37. data/examples/{rails_root → rails3_root}/config/initializers/mime_types.rb +0 -0
  38. data/examples/rails3_root/config/initializers/notifier_job.rb +1 -0
  39. data/examples/rails3_root/config/initializers/rspec_generator.rb +6 -0
  40. data/examples/rails3_root/config/initializers/session_store.rb +10 -0
  41. data/examples/rails3_root/config/locales/en.yml +5 -0
  42. data/examples/rails3_root/config/routes.rb +7 -0
  43. data/examples/{rails_root → rails3_root}/db/migrate/20090125013728_create_users.rb +0 -0
  44. data/examples/{rails_root → rails3_root}/db/migrate/20090908054656_create_delayed_jobs.rb +0 -0
  45. data/examples/{rails_root → rails3_root}/db/schema.rb +7 -6
  46. data/examples/rails3_root/db/seeds.rb +7 -0
  47. data/examples/rails3_root/doc/README_FOR_APP +2 -0
  48. data/examples/{rails_root → rails3_root}/features/attachments.feature +0 -0
  49. data/examples/{rails_root → rails3_root}/features/delayed_job.feature +0 -0
  50. data/examples/{rails_root → rails3_root}/features/errors.feature +0 -0
  51. data/examples/{sinatra → rails3_root}/features/example.feature +9 -0
  52. data/examples/{rails_root → rails3_root}/features/step_definitions/user_steps.rb +2 -2
  53. data/examples/rails3_root/features/step_definitions/web_steps.rb +219 -0
  54. data/examples/{rails_root → rails3_root}/features/support/env.rb +10 -10
  55. data/examples/rails3_root/features/support/env_ext.rb +2 -0
  56. data/examples/{rails_root → rails3_root}/features/support/paths.rb +2 -2
  57. data/examples/rails3_root/lib/notifier_job.rb +5 -0
  58. data/examples/{rails_root → rails3_root}/lib/tasks/cucumber.rake +6 -0
  59. data/examples/rails3_root/lib/tasks/rspec.rake +69 -0
  60. data/examples/rails3_root/public/404.html +26 -0
  61. data/examples/rails3_root/public/422.html +26 -0
  62. data/examples/rails3_root/public/500.html +26 -0
  63. data/examples/{rails_root → rails3_root}/public/favicon.ico +0 -0
  64. data/examples/{rails_root → rails3_root}/public/images/rails.png +0 -0
  65. data/examples/{rails_root → rails3_root}/public/javascripts/application.js +0 -0
  66. data/examples/{rails_root → rails3_root}/public/javascripts/controls.js +5 -3
  67. data/examples/{rails_root → rails3_root}/public/javascripts/dragdrop.js +7 -6
  68. data/examples/{rails_root → rails3_root}/public/javascripts/effects.js +8 -13
  69. data/examples/{rails_root → rails3_root}/public/javascripts/prototype.js +1573 -1019
  70. data/examples/rails3_root/public/javascripts/rails.js +109 -0
  71. data/examples/{rails_root → rails3_root}/public/robots.txt +0 -0
  72. data/examples/{rails_root → rails3_root}/script/cucumber +0 -0
  73. data/examples/rails3_root/script/rails +9 -0
  74. data/examples/rails3_root/spec/controllers/welcome_controller_spec.rb +20 -0
  75. data/examples/{rails_root → rails3_root}/spec/models/user_mailer_spec.rb +7 -18
  76. data/examples/rails3_root/spec/spec_helper.rb +19 -0
  77. data/examples/sinatra_root/config.ru +4 -0
  78. data/examples/{sinatra → sinatra_root}/features/errors.feature +0 -0
  79. data/examples/{rails_root → sinatra_root}/features/example.feature +0 -0
  80. data/examples/{sinatra → sinatra_root}/features/step_definitions/user_steps.rb +2 -2
  81. data/examples/sinatra_root/features/step_definitions/web_steps.rb +219 -0
  82. data/examples/sinatra_root/features/support/env.rb +21 -0
  83. data/examples/{sinatra → sinatra_root}/features/support/paths.rb +9 -4
  84. data/examples/sinatra_root/lib/example_sinatra_app.rb +35 -0
  85. data/lib/email_spec.rb +2 -2
  86. data/lib/email_spec/deliveries.rb +7 -11
  87. data/lib/email_spec/email_viewer.rb +1 -1
  88. data/lib/email_spec/helpers.rb +7 -7
  89. data/lib/email_spec/mail_ext.rb +11 -0
  90. data/lib/email_spec/matchers.rb +31 -26
  91. data/lib/generators/email_spec/steps/USAGE +5 -0
  92. data/lib/generators/email_spec/steps/steps_generator.rb +14 -0
  93. data/{examples/rails3_root/features/step_definitions → lib/generators/email_spec/steps/templates}/email_steps.rb +0 -0
  94. data/spec/email_spec/helpers_spec.rb +4 -6
  95. data/spec/email_spec/mail_ext_spec.rb +34 -0
  96. data/spec/email_spec/matchers_spec.rb +227 -37
  97. data/spec/spec_helper.rb +14 -2
  98. metadata +174 -207
  99. data/examples/rails_root/Rakefile +0 -13
  100. data/examples/rails_root/app/controllers/application_controller.rb +0 -15
  101. data/examples/rails_root/app/controllers/welcome_controller.rb +0 -16
  102. data/examples/rails_root/app/helpers/application_helper.rb +0 -3
  103. data/examples/rails_root/app/helpers/welcome_helper.rb +0 -2
  104. data/examples/rails_root/app/models/user_mailer.rb +0 -39
  105. data/examples/rails_root/config/boot.rb +0 -110
  106. data/examples/rails_root/config/cucumber.yml +0 -7
  107. data/examples/rails_root/config/environment.rb +0 -28
  108. data/examples/rails_root/config/environments/cucumber.rb +0 -29
  109. data/examples/rails_root/config/environments/development.rb +0 -17
  110. data/examples/rails_root/config/environments/production.rb +0 -28
  111. data/examples/rails_root/config/environments/test.rb +0 -28
  112. data/examples/rails_root/config/initializers/new_rails_defaults.rb +0 -17
  113. data/examples/rails_root/config/routes.rb +0 -45
  114. data/examples/rails_root/doc/README_FOR_APP +0 -5
  115. data/examples/rails_root/features/step_definitions/web_steps.rb +0 -273
  116. data/examples/rails_root/features/support/env_ext.rb +0 -6
  117. data/examples/rails_root/public/404.html +0 -30
  118. data/examples/rails_root/public/422.html +0 -30
  119. data/examples/rails_root/public/500.html +0 -33
  120. data/examples/rails_root/public/dispatch.rb +0 -10
  121. data/examples/rails_root/script/about +0 -4
  122. data/examples/rails_root/script/autospec +0 -5
  123. data/examples/rails_root/script/console +0 -3
  124. data/examples/rails_root/script/dbconsole +0 -3
  125. data/examples/rails_root/script/delayed_job +0 -5
  126. data/examples/rails_root/script/destroy +0 -3
  127. data/examples/rails_root/script/generate +0 -3
  128. data/examples/rails_root/script/performance/benchmarker +0 -3
  129. data/examples/rails_root/script/performance/profiler +0 -3
  130. data/examples/rails_root/script/performance/request +0 -3
  131. data/examples/rails_root/script/plugin +0 -3
  132. data/examples/rails_root/script/process/inspector +0 -3
  133. data/examples/rails_root/script/process/reaper +0 -3
  134. data/examples/rails_root/script/process/spawner +0 -3
  135. data/examples/rails_root/script/runner +0 -3
  136. data/examples/rails_root/script/server +0 -3
  137. data/examples/rails_root/script/spec +0 -5
  138. data/examples/rails_root/script/spec_server +0 -125
  139. data/examples/rails_root/spec/controllers/welcome_controller_spec.rb +0 -15
  140. data/examples/rails_root/spec/model_factory.rb +0 -6
  141. data/examples/rails_root/spec/models/user_spec.rb +0 -5
  142. data/examples/rails_root/spec/rcov.opts +0 -2
  143. data/examples/rails_root/spec/spec.opts +0 -4
  144. data/examples/rails_root/spec/spec_helper.rb +0 -51
  145. data/examples/sinatra/app.rb +0 -33
  146. data/examples/sinatra/features/step_definitions/email_steps.rb +0 -182
  147. data/examples/sinatra/features/step_definitions/web_steps.rb +0 -273
  148. data/examples/sinatra/features/support/env.rb +0 -39
  149. data/examples/sinatra_root/features/step_definitions/email_steps.rb +0 -194
  150. data/lib/email_spec/#helpers.rb# +0 -168
  151. data/spec/spec.opts +0 -4
@@ -34,24 +34,20 @@ describe EmailSpec::Matchers do
34
34
  end
35
35
  end
36
36
 
37
- def mock_email(stubs)
38
- mock("email", stubs)
39
- end
40
-
41
37
  describe "#reply_to" do
42
38
  it "should match when the email is set to deliver to the specified address" do
43
- email = mock_email(:reply_to => ["test@gmail.com"])
39
+ email = Mail::Message.new(:reply_to => ["test@gmail.com"])
44
40
  reply_to("test@gmail.com").should match(email)
45
41
  end
46
42
 
47
43
  it "should match given a name and address" do
48
- email = mock_email(:reply_to => ["test@gmail.com"])
44
+ email = Mail::Message.new(:reply_to => ["test@gmail.com"])
49
45
  reply_to("David Balatero <test@gmail.com>").should match(email)
50
46
  end
51
47
 
52
48
  it "should give correct failure message when the email is not set to deliver to the specified address" do
53
49
  matcher = reply_to("jimmy_bean@yahoo.com")
54
- matcher.matches?(mock_email(:inspect => 'email', :reply_to => ['freddy_noe@yahoo.com']))
50
+ matcher.matches?(Mail::Message.new(:reply_to => ['freddy_noe@yahoo.com']).with_inspect_stub)
55
51
  matcher.failure_message.should == %{expected email to reply to "jimmy_bean@yahoo.com", but it replied to "freddy_noe@yahoo.com"}
56
52
  end
57
53
 
@@ -59,13 +55,13 @@ describe EmailSpec::Matchers do
59
55
 
60
56
  describe "#deliver_to" do
61
57
  it "should match when the email is set to deliver to the specidied address" do
62
- email = mock_email(:to => "jimmy_bean@yahoo.com")
58
+ email = Mail::Message.new(:to => "jimmy_bean@yahoo.com")
63
59
 
64
60
  deliver_to("jimmy_bean@yahoo.com").should match(email)
65
61
  end
66
62
 
67
63
  it "should match when a list of emails is exact same as all of the email's recipients" do
68
- email = mock_email(:to => ["james@yahoo.com", "karen@yahoo.com"])
64
+ email = Mail::Message.new(:to => ["james@yahoo.com", "karen@yahoo.com"])
69
65
 
70
66
  deliver_to("karen@yahoo.com", "james@yahoo.com").should match(email)
71
67
  deliver_to("karen@yahoo.com").should_not match(email)
@@ -73,12 +69,12 @@ describe EmailSpec::Matchers do
73
69
 
74
70
  it "should match when an array of emails is exact same as all of the email's recipients" do
75
71
  addresses = ["james@yahoo.com", "karen@yahoo.com"]
76
- email = mock_email(:to => addresses)
72
+ email = Mail::Message.new(:to => addresses)
77
73
  deliver_to(addresses).should match(email)
78
74
  end
79
75
 
80
76
  it "should use the passed in objects :email method if not a string" do
81
- email = mock_email(:to => "jimmy_bean@yahoo.com")
77
+ email = Mail::Message.new(:to => "jimmy_bean@yahoo.com")
82
78
  user = mock("user", :email => "jimmy_bean@yahoo.com")
83
79
 
84
80
  deliver_to(user).should match(email)
@@ -86,7 +82,9 @@ describe EmailSpec::Matchers do
86
82
 
87
83
  it "should give correct failure message when the email is not set to deliver to the specified address" do
88
84
  matcher = deliver_to("jimmy_bean@yahoo.com")
89
- matcher.matches?(mock_email(:inspect => 'email', :to => 'freddy_noe@yahoo.com'))
85
+ message = Mail::Message.new(:to => 'freddy_noe@yahoo.com')
86
+ message.stub(:inspect).and_return("email")
87
+ matcher.matches?(message)
90
88
  matcher.failure_message.should == %{expected email to deliver to ["jimmy_bean@yahoo.com"], but it delivered to ["freddy_noe@yahoo.com"]}
91
89
  end
92
90
 
@@ -94,39 +92,39 @@ describe EmailSpec::Matchers do
94
92
 
95
93
  describe "#deliver_from" do
96
94
  it "should match when the email is set to deliver from the specified address" do
97
- email = mock_email(:from_addrs => [TMail::Address.parse("jimmy_bean@yahoo.com")])
95
+ email = Mail::Message.new(:from => "jimmy_bean@yahoo.com")
98
96
  deliver_from("jimmy_bean@yahoo.com").should match(email)
99
97
  end
100
98
 
101
99
  it "should match when the email is set to deliver from the specified name and address" do
102
- email = mock_email(:from_addrs => [TMail::Address.parse("Jimmy Bean <jimmy_bean@yahoo.com>")])
100
+ email = Mail::Message.new(:from => "Jimmy Bean <jimmy_bean@yahoo.com>")
103
101
  deliver_from("Jimmy Bean <jimmy_bean@yahoo.com>").should match(email)
104
102
  end
105
103
 
106
104
  it "should not match when the email does not have a sender" do
107
- email = mock_email(:from_addrs => nil)
105
+ email = Mail::Message.new(:from => nil)
108
106
  deliver_from("jimmy_bean@yahoo.com").should_not match(email)
109
107
  end
110
108
 
111
109
  it "should not match when the email addresses match but the names do not" do
112
- email = mock_email(:from_addrs => [TMail::Address.parse("Jimmy Bean <jimmy_bean@yahoo.com>")])
110
+ email = Mail::Message.new(:from => "Jimmy Bean <jimmy_bean@yahoo.com>")
113
111
  deliver_from("Freddy Noe <jimmy_bean@yahoo.com>").should_not match(email)
114
112
  end
115
113
 
116
114
  it "should not match when the names match but the email addresses do not" do
117
- email = mock_email(:from_addrs => [TMail::Address.parse("Jimmy Bean <jimmy_bean@yahoo.com>")])
115
+ email = Mail::Message.new(:from => "Jimmy Bean <jimmy_bean@yahoo.com>")
118
116
  deliver_from("Jimmy Bean <freddy_noe@yahoo.com>").should_not match(email)
119
117
  end
120
118
 
121
119
  it "should not match when the email is not set to deliver from the specified address" do
122
- email = mock_email(:from_addrs => [TMail::Address.parse("freddy_noe@yahoo.com")])
120
+ email = Mail::Message.new(:from => "freddy_noe@yahoo.com")
123
121
  deliver_from("jimmy_bean@yahoo.com").should_not match(email)
124
122
  end
125
123
 
126
124
  it "should give correct failure message when the email is not set to deliver from the specified address" do
127
125
  matcher = deliver_from("jimmy_bean@yahoo.com")
128
- matcher.matches?(mock_email(:inspect => 'email', :from_addrs => [TMail::Address.parse("freddy_noe@yahoo.com")]))
129
- matcher.failure_message.should == %{expected email to deliver from "jimmy_bean@yahoo.com", but it delivered from "freddy_noe@yahoo.com"}
126
+ matcher.matches?(Mail::Message.new(:from => "freddy_noe@yahoo.com"))
127
+ matcher.failure_message.should =~ /expected .+ to deliver from "jimmy_bean@yahoo\.com", but it delivered from "freddy_noe@yahoo\.com"/
130
128
  end
131
129
 
132
130
  end
@@ -134,13 +132,13 @@ describe EmailSpec::Matchers do
134
132
  describe "#bcc_to" do
135
133
 
136
134
  it "should match when the email is set to deliver to the specidied address" do
137
- email = mock_email(:bcc => "jimmy_bean@yahoo.com")
135
+ email = Mail::Message.new(:bcc => "jimmy_bean@yahoo.com")
138
136
 
139
137
  bcc_to("jimmy_bean@yahoo.com").should match(email)
140
138
  end
141
139
 
142
140
  it "should match when a list of emails is exact same as all of the email's recipients" do
143
- email = mock_email(:bcc => ["james@yahoo.com", "karen@yahoo.com"])
141
+ email = Mail::Message.new(:bcc => ["james@yahoo.com", "karen@yahoo.com"])
144
142
 
145
143
  bcc_to("karen@yahoo.com", "james@yahoo.com").should match(email)
146
144
  bcc_to("karen@yahoo.com").should_not match(email)
@@ -148,12 +146,12 @@ describe EmailSpec::Matchers do
148
146
 
149
147
  it "should match when an array of emails is exact same as all of the email's recipients" do
150
148
  addresses = ["james@yahoo.com", "karen@yahoo.com"]
151
- email = mock_email(:bcc => addresses)
149
+ email = Mail::Message.new(:bcc => addresses)
152
150
  bcc_to(addresses).should match(email)
153
151
  end
154
152
 
155
153
  it "should use the passed in objects :email method if not a string" do
156
- email = mock_email(:bcc => "jimmy_bean@yahoo.com")
154
+ email = Mail::Message.new(:bcc => "jimmy_bean@yahoo.com")
157
155
  user = mock("user", :email => "jimmy_bean@yahoo.com")
158
156
 
159
157
  bcc_to(user).should match(email)
@@ -165,31 +163,30 @@ describe EmailSpec::Matchers do
165
163
 
166
164
  describe "when regexps are used" do
167
165
 
168
- it "should match when the subject mathches regexp" do
169
- email = mock_email(:subject => ' -- The Subject --')
166
+ it "should match when the subject matches regexp" do
167
+ email = Mail::Message.new(:subject => ' -- The Subject --')
170
168
 
171
- have_subject(/The Subject/).should match(email)
172
169
  have_subject(/The Subject/).should match(email)
173
170
  have_subject(/foo/).should_not match(email)
174
171
  end
175
172
 
176
173
  it "should have a helpful description" do
177
174
  matcher = have_subject(/foo/)
178
- matcher.matches?(mock_email(:subject => "bar"))
175
+ matcher.matches?(Mail::Message.new(:subject => "bar"))
179
176
 
180
177
  matcher.description.should == "have subject matching /foo/"
181
178
  end
182
179
 
183
180
  it "should offer helpful failing messages" do
184
181
  matcher = have_subject(/foo/)
185
- matcher.matches?(mock_email(:subject => "bar"))
182
+ matcher.matches?(Mail::Message.new(:subject => "bar"))
186
183
 
187
184
  matcher.failure_message.should == 'expected the subject to match /foo/, but did not. Actual subject was: "bar"'
188
185
  end
189
186
 
190
187
  it "should offer helpful negative failing messages" do
191
188
  matcher = have_subject(/b/)
192
- matcher.matches?(mock_email(:subject => "bar"))
189
+ matcher.matches?(Mail::Message.new(:subject => "bar"))
193
190
 
194
191
  matcher.negative_failure_message.should == 'expected the subject not to match /b/ but "bar" does match it.'
195
192
  end
@@ -197,7 +194,7 @@ describe EmailSpec::Matchers do
197
194
 
198
195
  describe "when strings are used" do
199
196
  it "should match when the subject equals the passed in string exactly" do
200
- email = mock_email(:subject => 'foo')
197
+ email = Mail::Message.new(:subject => 'foo')
201
198
 
202
199
  have_subject("foo").should match(email)
203
200
  have_subject(" - foo -").should_not match(email)
@@ -205,21 +202,21 @@ describe EmailSpec::Matchers do
205
202
 
206
203
  it "should have a helpful description" do
207
204
  matcher = have_subject("foo")
208
- matcher.matches?(mock_email(:subject => "bar"))
205
+ matcher.matches?(Mail::Message.new(:subject => "bar"))
209
206
 
210
207
  matcher.description.should == 'have subject of "foo"'
211
208
  end
212
209
 
213
210
  it "should offer helpful failing messages" do
214
211
  matcher = have_subject("foo")
215
- matcher.matches?(mock_email(:subject => "bar"))
212
+ matcher.matches?(Mail::Message.new(:subject => "bar"))
216
213
 
217
214
  matcher.failure_message.should == 'expected the subject to be "foo" but was "bar"'
218
215
  end
219
216
 
220
217
  it "should offer helpful negative failing messages" do
221
218
  matcher = have_subject("bar")
222
- matcher.matches?(mock_email(:subject => "bar"))
219
+ matcher.matches?(Mail::Message.new(:subject => "bar"))
223
220
 
224
221
  matcher.negative_failure_message.should == 'expected the subject not to be "bar" but was'
225
222
  end
@@ -227,14 +224,207 @@ describe EmailSpec::Matchers do
227
224
  end
228
225
 
229
226
  describe "#include_email_with_subject" do
230
- it "should have specs!"
227
+
228
+ describe "when regexps are used" do
229
+
230
+ it "should match when any email's subject matches passed in regexp" do
231
+ emails = [Mail::Message.new(:subject => "foobar"), Mail::Message.new(:subject => "bazqux")]
232
+
233
+ include_email_with_subject(/foo/).should match(emails)
234
+ include_email_with_subject(/quux/).should_not match(emails)
235
+ end
236
+
237
+ it "should have a helpful description" do
238
+ matcher = include_email_with_subject(/foo/)
239
+ matcher.matches?([])
240
+
241
+ matcher.description.should == 'include email with subject matching /foo/'
242
+ end
243
+
244
+ it "should offer helpful failing messages" do
245
+ matcher = include_email_with_subject(/foo/)
246
+ matcher.matches?([Mail::Message.new(:subject => "bar")])
247
+
248
+ matcher.failure_message.should == 'expected at least one email to have a subject matching /foo/, but none did. Subjects were ["bar"]'
249
+ end
250
+
251
+ it "should offer helpful negative failing messages" do
252
+ matcher = include_email_with_subject(/foo/)
253
+ matcher.matches?([Mail::Message.new(:subject => "foo")])
254
+
255
+ matcher.negative_failure_message.should == 'expected no email to have a subject matching /foo/ but found at least one. Subjects were ["foo"]'
256
+ end
257
+ end
258
+
259
+ describe "when strings are used" do
260
+ it "should match when any email's subject equals passed in subject exactly" do
261
+ emails = [Mail::Message.new(:subject => "foobar"), Mail::Message.new(:subject => "bazqux")]
262
+
263
+ include_email_with_subject("foobar").should match(emails)
264
+ include_email_with_subject("foo").should_not match(emails)
265
+ end
266
+
267
+ it "should have a helpful description" do
268
+ matcher = include_email_with_subject("foo")
269
+ matcher.matches?([])
270
+
271
+ matcher.description.should == 'include email with subject of "foo"'
272
+ end
273
+
274
+ it "should offer helpful failing messages" do
275
+ matcher = include_email_with_subject("foo")
276
+ matcher.matches?([Mail::Message.new(:subject => "bar")])
277
+
278
+ matcher.failure_message.should == 'expected at least one email to have the subject "foo" but none did. Subjects were ["bar"]'
279
+ end
280
+
281
+ it "should offer helpful negative failing messages" do
282
+ matcher = include_email_with_subject("foo")
283
+ matcher.matches?([Mail::Message.new(:subject => "foo")])
284
+
285
+ matcher.negative_failure_message.should == 'expected no email with the subject "foo" but found at least one. Subjects were ["foo"]'
286
+ end
287
+ end
231
288
  end
232
289
 
233
290
  describe "#have_body_text" do
234
- it "should have specs!"
291
+ describe "when regexps are used" do
292
+ it "should match when the body matches regexp" do
293
+ email = Mail::Message.new(:body => 'foo bar baz')
294
+
295
+ have_body_text(/bar/).should match(email)
296
+ have_body_text(/qux/).should_not match(email)
297
+ end
298
+
299
+ it "should have a helpful description" do
300
+ matcher = have_body_text(/qux/)
301
+ matcher.matches?(Mail::Message.new(:body => 'foo bar baz'))
302
+
303
+ matcher.description.should == 'have body matching /qux/'
304
+ end
305
+
306
+ it "should offer helpful failing messages" do
307
+ matcher = have_body_text(/qux/)
308
+ matcher.matches?(Mail::Message.new(:body => 'foo bar baz'))
309
+
310
+ matcher.failure_message.should == 'expected the body to match /qux/, but did not. Actual body was: "foo bar baz"'
311
+ end
312
+
313
+ it "should offer helpful negative failing messages" do
314
+ matcher = have_body_text(/bar/)
315
+ matcher.matches?(Mail::Message.new(:body => 'foo bar baz'))
316
+
317
+ matcher.negative_failure_message.should == 'expected the body not to match /bar/ but "foo bar baz" does match it.'
318
+ end
319
+ end
320
+
321
+ describe "when strings are used" do
322
+ it "should match when the body includes the text" do
323
+ email = Mail::Message.new(:body => 'foo bar baz')
324
+
325
+ have_body_text('bar').should match(email)
326
+ have_body_text('qux').should_not match(email)
327
+ end
328
+
329
+ it "should have a helpful description" do
330
+ matcher = have_body_text('qux')
331
+ matcher.matches?(Mail::Message.new(:body => 'foo bar baz'))
332
+
333
+ matcher.description.should == 'have body including "qux"'
334
+ end
335
+
336
+ it "should offer helpful failing messages" do
337
+ matcher = have_body_text('qux')
338
+ matcher.matches?(Mail::Message.new(:body => 'foo bar baz'))
339
+
340
+ matcher.failure_message.should == 'expected the body to contain "qux" but was "foo bar baz"'
341
+ end
342
+
343
+ it "should offer helpful negative failing messages" do
344
+ matcher = have_body_text('bar')
345
+ matcher.matches?(Mail::Message.new(:body => 'foo bar baz'))
346
+
347
+ matcher.negative_failure_message.should == 'expected the body not to contain "bar" but was "foo bar baz"'
348
+ end
349
+ end
350
+
351
+ describe "when dealing with multipart messages" do
352
+ it "should look at the html part" do
353
+ email = Mail.new do
354
+ text_part do
355
+ body "This is text"
356
+ end
357
+ html_part do
358
+ body "This is html"
359
+ end
360
+ end
361
+ have_body_text(/This is html/).should match(email)
362
+ have_body_text(/This is text/).should_not match(email)
363
+ end
364
+ end
235
365
  end
236
366
 
237
367
  describe "#have_header" do
238
- it "should have specs!"
368
+ describe "when regexps are used" do
369
+ it "should match when header matches passed in regexp" do
370
+ email = Mail::Message.new(:content_type => "text/html")
371
+
372
+ have_header(:content_type, /text/).should match(email)
373
+ have_header(:foo, /text/).should_not match(email)
374
+ have_header(:content_type, /bar/).should_not match(email)
375
+ end
376
+
377
+ it "should have a helpful description" do
378
+ matcher = have_header(:content_type, /bar/)
379
+ matcher.matches?(Mail::Message.new(:content_type => "text/html"))
380
+
381
+ matcher.description.should == 'have header content_type with value matching /bar/'
382
+ end
383
+
384
+ it "should offer helpful failing messages" do
385
+ matcher = have_header(:content_type, /bar/)
386
+ matcher.matches?(Mail::Message.new(:content_type => "text/html"))
387
+
388
+ matcher.failure_message.should == 'expected the headers to include \'content_type\' with a value matching /bar/ but they were {"content-type"=>"text/html"}'
389
+ end
390
+
391
+ it "should offer helpful negative failing messages" do
392
+ matcher = have_header(:content_type, /text/)
393
+ matcher.matches?(Mail::Message.new(:content_type => "text/html"))
394
+
395
+ matcher.negative_failure_message.should == 'expected the headers not to include \'content_type\' with a value matching /text/ but they were {"content-type"=>"text/html"}'
396
+ end
397
+ end
398
+
399
+ describe "when strings are used" do
400
+ it "should match when header equals passed in value exactly" do
401
+ email = Mail::Message.new(:content_type => "text/html")
402
+
403
+ have_header(:content_type, 'text/html').should match(email)
404
+ have_header(:foo, 'text/html').should_not match(email)
405
+ have_header(:content_type, 'text').should_not match(email)
406
+ end
407
+
408
+ it "should have a helpful description" do
409
+ matcher = have_header(:content_type, 'text')
410
+ matcher.matches?(Mail::Message.new(:content_type => "text/html"))
411
+
412
+ matcher.description.should == 'have header content_type: text'
413
+ end
414
+
415
+ it "should offer helpful failing messages" do
416
+ matcher = have_header(:content_type, 'text')
417
+ matcher.matches?(Mail::Message.new(:content_type => "text/html"))
418
+
419
+ matcher.failure_message.should == 'expected the headers to include \'content_type: text\' but they were {"content-type"=>"text/html"}'
420
+ end
421
+
422
+ it "should offer helpful negative failing messages" do
423
+ matcher = have_header(:content_type, 'text/html')
424
+ matcher.matches?(Mail::Message.new(:content_type => "text/html"))
425
+
426
+ matcher.negative_failure_message == 'expected the headers not to include \'content_type: text/html\' but they were {:content_type=>"text/html"}'
427
+ end
428
+ end
239
429
  end
240
430
  end
@@ -1,4 +1,16 @@
1
1
  require 'rubygems'
2
- require 'actionmailer'
3
- require 'spec'
2
+ require 'action_mailer'
3
+ require 'rspec'
4
+ require 'mail'
4
5
  require File.expand_path(File.dirname(__FILE__) + '/../lib/email_spec.rb')
6
+
7
+ class Mail::Message
8
+ def with_inspect_stub(str = "email")
9
+ stub!(:inspect).and_return(str)
10
+ self
11
+ end
12
+ end
13
+
14
+ RSpec.configure do |config|
15
+ config.mock_with :rspec
16
+ end
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: email_spec
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 6
9
- - 6
10
- version: 0.6.6
4
+ prerelease:
5
+ version: 1.0.1
11
6
  platform: ruby
12
7
  authors:
13
8
  - Ben Mabey
@@ -17,8 +12,7 @@ autorequire:
17
12
  bindir: bin
18
13
  cert_chain: []
19
14
 
20
- date: 2011-03-26 00:00:00 -06:00
21
- default_executable:
15
+ date: 2012-01-13 00:00:00 Z
22
16
  dependencies:
23
17
  - !ruby/object:Gem::Dependency
24
18
  name: rspec
@@ -26,12 +20,9 @@ dependencies:
26
20
  requirement: &id001 !ruby/object:Gem::Requirement
27
21
  none: false
28
22
  requirements:
29
- - - ">="
23
+ - - ~>
30
24
  - !ruby/object:Gem::Version
31
- hash: 3
32
- segments:
33
- - 0
34
- version: "0"
25
+ version: 2.0.0
35
26
  type: :runtime
36
27
  version_requirements: *id001
37
28
  description: Easily test email in rspec and cucumber
@@ -51,112 +42,104 @@ files:
51
42
  - install.rb
52
43
  - lib/email-spec.rb
53
44
  - lib/email_spec.rb
54
- - lib/email_spec/#helpers.rb#
55
45
  - lib/email_spec/address_converter.rb
56
46
  - lib/email_spec/background_processes.rb
57
47
  - lib/email_spec/cucumber.rb
58
48
  - lib/email_spec/deliveries.rb
59
49
  - lib/email_spec/email_viewer.rb
60
50
  - lib/email_spec/helpers.rb
51
+ - lib/email_spec/mail_ext.rb
61
52
  - lib/email_spec/matchers.rb
53
+ - lib/generators/email_spec/steps/USAGE
54
+ - lib/generators/email_spec/steps/steps_generator.rb
55
+ - lib/generators/email_spec/steps/templates/email_steps.rb
62
56
  - rails_generators/email_spec/email_spec_generator.rb
63
57
  - rails_generators/email_spec/templates/email_steps.rb
64
58
  - spec/email_spec/helpers_spec.rb
59
+ - spec/email_spec/mail_ext_spec.rb
65
60
  - spec/email_spec/matchers_spec.rb
66
- - spec/spec.opts
67
61
  - spec/spec_helper.rb
68
- - examples/rails3_root/features/step_definitions/email_steps.rb
69
- - examples/rails_root/app/controllers/application_controller.rb
70
- - examples/rails_root/app/controllers/welcome_controller.rb
71
- - examples/rails_root/app/helpers/application_helper.rb
72
- - examples/rails_root/app/helpers/welcome_helper.rb
73
- - examples/rails_root/app/models/user.rb
74
- - examples/rails_root/app/models/user_mailer.rb
75
- - examples/rails_root/app/views/user_mailer/attachments.erb
76
- - examples/rails_root/app/views/user_mailer/newsletter.erb
77
- - examples/rails_root/app/views/user_mailer/signup.erb
78
- - examples/rails_root/app/views/welcome/attachments.html.erb
79
- - examples/rails_root/app/views/welcome/confirm.html.erb
80
- - examples/rails_root/app/views/welcome/index.html.erb
81
- - examples/rails_root/app/views/welcome/newsletter.html.erb
82
- - examples/rails_root/app/views/welcome/signup.html.erb
83
- - examples/rails_root/attachments/document.pdf
84
- - examples/rails_root/attachments/image.png
85
- - examples/rails_root/config/boot.rb
86
- - examples/rails_root/config/cucumber.yml
87
- - examples/rails_root/config/database.yml
88
- - examples/rails_root/config/environment.rb
89
- - examples/rails_root/config/environments/cucumber.rb
90
- - examples/rails_root/config/environments/development.rb
91
- - examples/rails_root/config/environments/production.rb
92
- - examples/rails_root/config/environments/test.rb
93
- - examples/rails_root/config/initializers/inflections.rb
94
- - examples/rails_root/config/initializers/mime_types.rb
95
- - examples/rails_root/config/initializers/new_rails_defaults.rb
96
- - examples/rails_root/config/routes.rb
97
- - examples/rails_root/db/migrate/20090125013728_create_users.rb
98
- - examples/rails_root/db/migrate/20090908054656_create_delayed_jobs.rb
99
- - examples/rails_root/db/schema.rb
100
- - examples/rails_root/doc/README_FOR_APP
101
- - examples/rails_root/features/attachments.feature
102
- - examples/rails_root/features/delayed_job.feature
103
- - examples/rails_root/features/errors.feature
104
- - examples/rails_root/features/example.feature
105
- - examples/rails_root/features/step_definitions/user_steps.rb
106
- - examples/rails_root/features/step_definitions/web_steps.rb
107
- - examples/rails_root/features/support/env.rb
108
- - examples/rails_root/features/support/env_ext.rb
109
- - examples/rails_root/features/support/paths.rb
110
- - examples/rails_root/lib/tasks/cucumber.rake
111
- - examples/rails_root/public/404.html
112
- - examples/rails_root/public/422.html
113
- - examples/rails_root/public/500.html
114
- - examples/rails_root/public/dispatch.rb
115
- - examples/rails_root/public/favicon.ico
116
- - examples/rails_root/public/images/rails.png
117
- - examples/rails_root/public/javascripts/application.js
118
- - examples/rails_root/public/javascripts/controls.js
119
- - examples/rails_root/public/javascripts/dragdrop.js
120
- - examples/rails_root/public/javascripts/effects.js
121
- - examples/rails_root/public/javascripts/prototype.js
122
- - examples/rails_root/public/robots.txt
123
- - examples/rails_root/Rakefile
124
- - examples/rails_root/script/about
125
- - examples/rails_root/script/autospec
126
- - examples/rails_root/script/console
127
- - examples/rails_root/script/cucumber
128
- - examples/rails_root/script/dbconsole
129
- - examples/rails_root/script/delayed_job
130
- - examples/rails_root/script/destroy
131
- - examples/rails_root/script/generate
132
- - examples/rails_root/script/performance/benchmarker
133
- - examples/rails_root/script/performance/profiler
134
- - examples/rails_root/script/performance/request
135
- - examples/rails_root/script/plugin
136
- - examples/rails_root/script/process/inspector
137
- - examples/rails_root/script/process/reaper
138
- - examples/rails_root/script/process/spawner
139
- - examples/rails_root/script/runner
140
- - examples/rails_root/script/server
141
- - examples/rails_root/script/spec
142
- - examples/rails_root/script/spec_server
143
- - examples/rails_root/spec/controllers/welcome_controller_spec.rb
144
- - examples/rails_root/spec/model_factory.rb
145
- - examples/rails_root/spec/models/user_mailer_spec.rb
146
- - examples/rails_root/spec/models/user_spec.rb
147
- - examples/rails_root/spec/rcov.opts
148
- - examples/rails_root/spec/spec.opts
149
- - examples/rails_root/spec/spec_helper.rb
150
- - examples/sinatra/app.rb
151
- - examples/sinatra/features/errors.feature
152
- - examples/sinatra/features/example.feature
153
- - examples/sinatra/features/step_definitions/email_steps.rb
154
- - examples/sinatra/features/step_definitions/user_steps.rb
155
- - examples/sinatra/features/step_definitions/web_steps.rb
156
- - examples/sinatra/features/support/env.rb
157
- - examples/sinatra/features/support/paths.rb
158
- - examples/sinatra_root/features/step_definitions/email_steps.rb
159
- has_rdoc: true
62
+ - examples/rails3_root/app/controllers/application_controller.rb
63
+ - examples/rails3_root/app/controllers/welcome_controller.rb
64
+ - examples/rails3_root/app/helpers/application_helper.rb
65
+ - examples/rails3_root/app/mailers/user_mailer.rb
66
+ - examples/rails3_root/app/models/user.rb
67
+ - examples/rails3_root/app/views/user_mailer/attachments.html.erb
68
+ - examples/rails3_root/app/views/user_mailer/newsletter.html.erb
69
+ - examples/rails3_root/app/views/user_mailer/signup.html.erb
70
+ - examples/rails3_root/app/views/user_mailer/signup.text.erb
71
+ - examples/rails3_root/app/views/welcome/attachments.html.erb
72
+ - examples/rails3_root/app/views/welcome/confirm.html.erb
73
+ - examples/rails3_root/app/views/welcome/index.html.erb
74
+ - examples/rails3_root/app/views/welcome/newsletter.html.erb
75
+ - examples/rails3_root/app/views/welcome/signup.html.erb
76
+ - examples/rails3_root/attachments/document.pdf
77
+ - examples/rails3_root/attachments/image.png
78
+ - examples/rails3_root/config/application.rb
79
+ - examples/rails3_root/config/boot.rb
80
+ - examples/rails3_root/config/cucumber.yml
81
+ - examples/rails3_root/config/database.yml
82
+ - examples/rails3_root/config/environment.rb
83
+ - examples/rails3_root/config/environments/development.rb
84
+ - examples/rails3_root/config/environments/production.rb
85
+ - examples/rails3_root/config/environments/test.rb
86
+ - examples/rails3_root/config/initializers/backtrace_silencers.rb
87
+ - examples/rails3_root/config/initializers/cookie_verification_secret.rb
88
+ - examples/rails3_root/config/initializers/delayed_job.rb
89
+ - examples/rails3_root/config/initializers/inflections.rb
90
+ - examples/rails3_root/config/initializers/mime_types.rb
91
+ - examples/rails3_root/config/initializers/notifier_job.rb
92
+ - examples/rails3_root/config/initializers/rspec_generator.rb
93
+ - examples/rails3_root/config/initializers/session_store.rb
94
+ - examples/rails3_root/config/locales/en.yml
95
+ - examples/rails3_root/config/routes.rb
96
+ - examples/rails3_root/config.ru
97
+ - examples/rails3_root/db/migrate/20090125013728_create_users.rb
98
+ - examples/rails3_root/db/migrate/20090908054656_create_delayed_jobs.rb
99
+ - examples/rails3_root/db/schema.rb
100
+ - examples/rails3_root/db/seeds.rb
101
+ - examples/rails3_root/doc/README_FOR_APP
102
+ - examples/rails3_root/features/attachments.feature
103
+ - examples/rails3_root/features/delayed_job.feature
104
+ - examples/rails3_root/features/errors.feature
105
+ - examples/rails3_root/features/example.feature
106
+ - examples/rails3_root/features/step_definitions/user_steps.rb
107
+ - examples/rails3_root/features/step_definitions/web_steps.rb
108
+ - examples/rails3_root/features/support/env.rb
109
+ - examples/rails3_root/features/support/env_ext.rb
110
+ - examples/rails3_root/features/support/paths.rb
111
+ - examples/rails3_root/Gemfile
112
+ - examples/rails3_root/Gemfile.lock
113
+ - examples/rails3_root/lib/notifier_job.rb
114
+ - examples/rails3_root/lib/tasks/cucumber.rake
115
+ - examples/rails3_root/lib/tasks/rspec.rake
116
+ - examples/rails3_root/public/404.html
117
+ - examples/rails3_root/public/422.html
118
+ - examples/rails3_root/public/500.html
119
+ - examples/rails3_root/public/favicon.ico
120
+ - examples/rails3_root/public/images/rails.png
121
+ - examples/rails3_root/public/javascripts/application.js
122
+ - examples/rails3_root/public/javascripts/controls.js
123
+ - examples/rails3_root/public/javascripts/dragdrop.js
124
+ - examples/rails3_root/public/javascripts/effects.js
125
+ - examples/rails3_root/public/javascripts/prototype.js
126
+ - examples/rails3_root/public/javascripts/rails.js
127
+ - examples/rails3_root/public/robots.txt
128
+ - examples/rails3_root/Rakefile
129
+ - examples/rails3_root/README
130
+ - examples/rails3_root/script/cucumber
131
+ - examples/rails3_root/script/rails
132
+ - examples/rails3_root/spec/controllers/welcome_controller_spec.rb
133
+ - examples/rails3_root/spec/models/user_mailer_spec.rb
134
+ - examples/rails3_root/spec/spec_helper.rb
135
+ - examples/sinatra_root/config.ru
136
+ - examples/sinatra_root/features/errors.feature
137
+ - examples/sinatra_root/features/example.feature
138
+ - examples/sinatra_root/features/step_definitions/user_steps.rb
139
+ - examples/sinatra_root/features/step_definitions/web_steps.rb
140
+ - examples/sinatra_root/features/support/env.rb
141
+ - examples/sinatra_root/features/support/paths.rb
142
+ - examples/sinatra_root/lib/example_sinatra_app.rb
160
143
  homepage: http://github.com/bmabey/email-spec/
161
144
  licenses: []
162
145
 
@@ -170,119 +153,103 @@ required_ruby_version: !ruby/object:Gem::Requirement
170
153
  requirements:
171
154
  - - ">="
172
155
  - !ruby/object:Gem::Version
173
- hash: 3
174
- segments:
175
- - 0
176
156
  version: "0"
177
157
  required_rubygems_version: !ruby/object:Gem::Requirement
178
158
  none: false
179
159
  requirements:
180
160
  - - ">="
181
161
  - !ruby/object:Gem::Version
182
- hash: 3
183
- segments:
184
- - 0
185
162
  version: "0"
186
163
  requirements: []
187
164
 
188
165
  rubyforge_project: email-spec
189
- rubygems_version: 1.3.7
166
+ rubygems_version: 1.8.10
190
167
  signing_key:
191
168
  specification_version: 3
192
169
  summary: Easily test email in rspec and cucumber
193
170
  test_files:
194
171
  - spec/email_spec/helpers_spec.rb
172
+ - spec/email_spec/mail_ext_spec.rb
195
173
  - spec/email_spec/matchers_spec.rb
196
- - spec/spec.opts
197
174
  - spec/spec_helper.rb
198
- - examples/rails3_root/features/step_definitions/email_steps.rb
199
- - examples/rails_root/app/controllers/application_controller.rb
200
- - examples/rails_root/app/controllers/welcome_controller.rb
201
- - examples/rails_root/app/helpers/application_helper.rb
202
- - examples/rails_root/app/helpers/welcome_helper.rb
203
- - examples/rails_root/app/models/user.rb
204
- - examples/rails_root/app/models/user_mailer.rb
205
- - examples/rails_root/app/views/user_mailer/attachments.erb
206
- - examples/rails_root/app/views/user_mailer/newsletter.erb
207
- - examples/rails_root/app/views/user_mailer/signup.erb
208
- - examples/rails_root/app/views/welcome/attachments.html.erb
209
- - examples/rails_root/app/views/welcome/confirm.html.erb
210
- - examples/rails_root/app/views/welcome/index.html.erb
211
- - examples/rails_root/app/views/welcome/newsletter.html.erb
212
- - examples/rails_root/app/views/welcome/signup.html.erb
213
- - examples/rails_root/attachments/document.pdf
214
- - examples/rails_root/attachments/image.png
215
- - examples/rails_root/config/boot.rb
216
- - examples/rails_root/config/cucumber.yml
217
- - examples/rails_root/config/database.yml
218
- - examples/rails_root/config/environment.rb
219
- - examples/rails_root/config/environments/cucumber.rb
220
- - examples/rails_root/config/environments/development.rb
221
- - examples/rails_root/config/environments/production.rb
222
- - examples/rails_root/config/environments/test.rb
223
- - examples/rails_root/config/initializers/inflections.rb
224
- - examples/rails_root/config/initializers/mime_types.rb
225
- - examples/rails_root/config/initializers/new_rails_defaults.rb
226
- - examples/rails_root/config/routes.rb
227
- - examples/rails_root/db/migrate/20090125013728_create_users.rb
228
- - examples/rails_root/db/migrate/20090908054656_create_delayed_jobs.rb
229
- - examples/rails_root/db/schema.rb
230
- - examples/rails_root/doc/README_FOR_APP
231
- - examples/rails_root/features/attachments.feature
232
- - examples/rails_root/features/delayed_job.feature
233
- - examples/rails_root/features/errors.feature
234
- - examples/rails_root/features/example.feature
235
- - examples/rails_root/features/step_definitions/user_steps.rb
236
- - examples/rails_root/features/step_definitions/web_steps.rb
237
- - examples/rails_root/features/support/env.rb
238
- - examples/rails_root/features/support/env_ext.rb
239
- - examples/rails_root/features/support/paths.rb
240
- - examples/rails_root/lib/tasks/cucumber.rake
241
- - examples/rails_root/public/404.html
242
- - examples/rails_root/public/422.html
243
- - examples/rails_root/public/500.html
244
- - examples/rails_root/public/dispatch.rb
245
- - examples/rails_root/public/favicon.ico
246
- - examples/rails_root/public/images/rails.png
247
- - examples/rails_root/public/javascripts/application.js
248
- - examples/rails_root/public/javascripts/controls.js
249
- - examples/rails_root/public/javascripts/dragdrop.js
250
- - examples/rails_root/public/javascripts/effects.js
251
- - examples/rails_root/public/javascripts/prototype.js
252
- - examples/rails_root/public/robots.txt
253
- - examples/rails_root/Rakefile
254
- - examples/rails_root/script/about
255
- - examples/rails_root/script/autospec
256
- - examples/rails_root/script/console
257
- - examples/rails_root/script/cucumber
258
- - examples/rails_root/script/dbconsole
259
- - examples/rails_root/script/delayed_job
260
- - examples/rails_root/script/destroy
261
- - examples/rails_root/script/generate
262
- - examples/rails_root/script/performance/benchmarker
263
- - examples/rails_root/script/performance/profiler
264
- - examples/rails_root/script/performance/request
265
- - examples/rails_root/script/plugin
266
- - examples/rails_root/script/process/inspector
267
- - examples/rails_root/script/process/reaper
268
- - examples/rails_root/script/process/spawner
269
- - examples/rails_root/script/runner
270
- - examples/rails_root/script/server
271
- - examples/rails_root/script/spec
272
- - examples/rails_root/script/spec_server
273
- - examples/rails_root/spec/controllers/welcome_controller_spec.rb
274
- - examples/rails_root/spec/model_factory.rb
275
- - examples/rails_root/spec/models/user_mailer_spec.rb
276
- - examples/rails_root/spec/models/user_spec.rb
277
- - examples/rails_root/spec/rcov.opts
278
- - examples/rails_root/spec/spec.opts
279
- - examples/rails_root/spec/spec_helper.rb
280
- - examples/sinatra/app.rb
281
- - examples/sinatra/features/errors.feature
282
- - examples/sinatra/features/example.feature
283
- - examples/sinatra/features/step_definitions/email_steps.rb
284
- - examples/sinatra/features/step_definitions/user_steps.rb
285
- - examples/sinatra/features/step_definitions/web_steps.rb
286
- - examples/sinatra/features/support/env.rb
287
- - examples/sinatra/features/support/paths.rb
288
- - examples/sinatra_root/features/step_definitions/email_steps.rb
175
+ - examples/rails3_root/app/controllers/application_controller.rb
176
+ - examples/rails3_root/app/controllers/welcome_controller.rb
177
+ - examples/rails3_root/app/helpers/application_helper.rb
178
+ - examples/rails3_root/app/mailers/user_mailer.rb
179
+ - examples/rails3_root/app/models/user.rb
180
+ - examples/rails3_root/app/views/user_mailer/attachments.html.erb
181
+ - examples/rails3_root/app/views/user_mailer/newsletter.html.erb
182
+ - examples/rails3_root/app/views/user_mailer/signup.html.erb
183
+ - examples/rails3_root/app/views/user_mailer/signup.text.erb
184
+ - examples/rails3_root/app/views/welcome/attachments.html.erb
185
+ - examples/rails3_root/app/views/welcome/confirm.html.erb
186
+ - examples/rails3_root/app/views/welcome/index.html.erb
187
+ - examples/rails3_root/app/views/welcome/newsletter.html.erb
188
+ - examples/rails3_root/app/views/welcome/signup.html.erb
189
+ - examples/rails3_root/attachments/document.pdf
190
+ - examples/rails3_root/attachments/image.png
191
+ - examples/rails3_root/config/application.rb
192
+ - examples/rails3_root/config/boot.rb
193
+ - examples/rails3_root/config/cucumber.yml
194
+ - examples/rails3_root/config/database.yml
195
+ - examples/rails3_root/config/environment.rb
196
+ - examples/rails3_root/config/environments/development.rb
197
+ - examples/rails3_root/config/environments/production.rb
198
+ - examples/rails3_root/config/environments/test.rb
199
+ - examples/rails3_root/config/initializers/backtrace_silencers.rb
200
+ - examples/rails3_root/config/initializers/cookie_verification_secret.rb
201
+ - examples/rails3_root/config/initializers/delayed_job.rb
202
+ - examples/rails3_root/config/initializers/inflections.rb
203
+ - examples/rails3_root/config/initializers/mime_types.rb
204
+ - examples/rails3_root/config/initializers/notifier_job.rb
205
+ - examples/rails3_root/config/initializers/rspec_generator.rb
206
+ - examples/rails3_root/config/initializers/session_store.rb
207
+ - examples/rails3_root/config/locales/en.yml
208
+ - examples/rails3_root/config/routes.rb
209
+ - examples/rails3_root/config.ru
210
+ - examples/rails3_root/db/migrate/20090125013728_create_users.rb
211
+ - examples/rails3_root/db/migrate/20090908054656_create_delayed_jobs.rb
212
+ - examples/rails3_root/db/schema.rb
213
+ - examples/rails3_root/db/seeds.rb
214
+ - examples/rails3_root/doc/README_FOR_APP
215
+ - examples/rails3_root/features/attachments.feature
216
+ - examples/rails3_root/features/delayed_job.feature
217
+ - examples/rails3_root/features/errors.feature
218
+ - examples/rails3_root/features/example.feature
219
+ - examples/rails3_root/features/step_definitions/user_steps.rb
220
+ - examples/rails3_root/features/step_definitions/web_steps.rb
221
+ - examples/rails3_root/features/support/env.rb
222
+ - examples/rails3_root/features/support/env_ext.rb
223
+ - examples/rails3_root/features/support/paths.rb
224
+ - examples/rails3_root/Gemfile
225
+ - examples/rails3_root/Gemfile.lock
226
+ - examples/rails3_root/lib/notifier_job.rb
227
+ - examples/rails3_root/lib/tasks/cucumber.rake
228
+ - examples/rails3_root/lib/tasks/rspec.rake
229
+ - examples/rails3_root/public/404.html
230
+ - examples/rails3_root/public/422.html
231
+ - examples/rails3_root/public/500.html
232
+ - examples/rails3_root/public/favicon.ico
233
+ - examples/rails3_root/public/images/rails.png
234
+ - examples/rails3_root/public/javascripts/application.js
235
+ - examples/rails3_root/public/javascripts/controls.js
236
+ - examples/rails3_root/public/javascripts/dragdrop.js
237
+ - examples/rails3_root/public/javascripts/effects.js
238
+ - examples/rails3_root/public/javascripts/prototype.js
239
+ - examples/rails3_root/public/javascripts/rails.js
240
+ - examples/rails3_root/public/robots.txt
241
+ - examples/rails3_root/Rakefile
242
+ - examples/rails3_root/README
243
+ - examples/rails3_root/script/cucumber
244
+ - examples/rails3_root/script/rails
245
+ - examples/rails3_root/spec/controllers/welcome_controller_spec.rb
246
+ - examples/rails3_root/spec/models/user_mailer_spec.rb
247
+ - examples/rails3_root/spec/spec_helper.rb
248
+ - examples/sinatra_root/config.ru
249
+ - examples/sinatra_root/features/errors.feature
250
+ - examples/sinatra_root/features/example.feature
251
+ - examples/sinatra_root/features/step_definitions/user_steps.rb
252
+ - examples/sinatra_root/features/step_definitions/web_steps.rb
253
+ - examples/sinatra_root/features/support/env.rb
254
+ - examples/sinatra_root/features/support/paths.rb
255
+ - examples/sinatra_root/lib/example_sinatra_app.rb