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.
- data/History.txt +21 -26
- data/README.rdoc +5 -3
- data/Rakefile +16 -27
- data/examples/rails3_root/Gemfile +17 -0
- data/examples/rails3_root/Gemfile.lock +138 -0
- data/examples/rails3_root/README +5 -0
- data/examples/rails3_root/Rakefile +11 -0
- data/examples/rails3_root/app/controllers/application_controller.rb +3 -0
- data/examples/rails3_root/app/controllers/welcome_controller.rb +16 -0
- data/examples/rails3_root/app/helpers/application_helper.rb +2 -0
- data/examples/rails3_root/app/mailers/user_mailer.rb +39 -0
- data/examples/{rails_root → rails3_root}/app/models/user.rb +0 -0
- data/examples/{rails_root/app/views/user_mailer/attachments.erb → rails3_root/app/views/user_mailer/attachments.html.erb} +0 -0
- data/examples/{rails_root/app/views/user_mailer/newsletter.erb → rails3_root/app/views/user_mailer/newsletter.html.erb} +0 -0
- data/examples/{rails_root/app/views/user_mailer/signup.erb → rails3_root/app/views/user_mailer/signup.html.erb} +1 -0
- data/examples/rails3_root/app/views/user_mailer/signup.text.erb +4 -0
- data/examples/{rails_root → rails3_root}/app/views/welcome/attachments.html.erb +0 -0
- data/examples/{rails_root → rails3_root}/app/views/welcome/confirm.html.erb +0 -0
- data/examples/{rails_root → rails3_root}/app/views/welcome/index.html.erb +1 -1
- data/examples/{rails_root → rails3_root}/app/views/welcome/newsletter.html.erb +0 -0
- data/examples/{rails_root → rails3_root}/app/views/welcome/signup.html.erb +0 -0
- data/examples/{rails_root → rails3_root}/attachments/document.pdf +0 -0
- data/examples/{rails_root → rails3_root}/attachments/image.png +0 -0
- data/examples/rails3_root/config.ru +4 -0
- data/examples/rails3_root/config/application.rb +43 -0
- data/examples/rails3_root/config/boot.rb +14 -0
- data/examples/rails3_root/config/cucumber.yml +8 -0
- data/examples/{rails_root → rails3_root}/config/database.yml +0 -0
- data/examples/rails3_root/config/environment.rb +6 -0
- data/examples/rails3_root/config/environments/development.rb +20 -0
- data/examples/rails3_root/config/environments/production.rb +42 -0
- data/examples/rails3_root/config/environments/test.rb +30 -0
- data/examples/rails3_root/config/initializers/backtrace_silencers.rb +7 -0
- data/examples/rails3_root/config/initializers/cookie_verification_secret.rb +7 -0
- data/examples/rails3_root/config/initializers/delayed_job.rb +1 -0
- data/examples/{rails_root → rails3_root}/config/initializers/inflections.rb +0 -0
- data/examples/{rails_root → rails3_root}/config/initializers/mime_types.rb +0 -0
- data/examples/rails3_root/config/initializers/notifier_job.rb +1 -0
- data/examples/rails3_root/config/initializers/rspec_generator.rb +6 -0
- data/examples/rails3_root/config/initializers/session_store.rb +10 -0
- data/examples/rails3_root/config/locales/en.yml +5 -0
- data/examples/rails3_root/config/routes.rb +7 -0
- data/examples/{rails_root → rails3_root}/db/migrate/20090125013728_create_users.rb +0 -0
- data/examples/{rails_root → rails3_root}/db/migrate/20090908054656_create_delayed_jobs.rb +0 -0
- data/examples/{rails_root → rails3_root}/db/schema.rb +7 -6
- data/examples/rails3_root/db/seeds.rb +7 -0
- data/examples/rails3_root/doc/README_FOR_APP +2 -0
- data/examples/{rails_root → rails3_root}/features/attachments.feature +0 -0
- data/examples/{rails_root → rails3_root}/features/delayed_job.feature +0 -0
- data/examples/{rails_root → rails3_root}/features/errors.feature +0 -0
- data/examples/{sinatra → rails3_root}/features/example.feature +9 -0
- data/examples/{rails_root → rails3_root}/features/step_definitions/user_steps.rb +2 -2
- data/examples/rails3_root/features/step_definitions/web_steps.rb +219 -0
- data/examples/{rails_root → rails3_root}/features/support/env.rb +10 -10
- data/examples/rails3_root/features/support/env_ext.rb +2 -0
- data/examples/{rails_root → rails3_root}/features/support/paths.rb +2 -2
- data/examples/rails3_root/lib/notifier_job.rb +5 -0
- data/examples/{rails_root → rails3_root}/lib/tasks/cucumber.rake +6 -0
- data/examples/rails3_root/lib/tasks/rspec.rake +69 -0
- data/examples/rails3_root/public/404.html +26 -0
- data/examples/rails3_root/public/422.html +26 -0
- data/examples/rails3_root/public/500.html +26 -0
- data/examples/{rails_root → rails3_root}/public/favicon.ico +0 -0
- data/examples/{rails_root → rails3_root}/public/images/rails.png +0 -0
- data/examples/{rails_root → rails3_root}/public/javascripts/application.js +0 -0
- data/examples/{rails_root → rails3_root}/public/javascripts/controls.js +5 -3
- data/examples/{rails_root → rails3_root}/public/javascripts/dragdrop.js +7 -6
- data/examples/{rails_root → rails3_root}/public/javascripts/effects.js +8 -13
- data/examples/{rails_root → rails3_root}/public/javascripts/prototype.js +1573 -1019
- data/examples/rails3_root/public/javascripts/rails.js +109 -0
- data/examples/{rails_root → rails3_root}/public/robots.txt +0 -0
- data/examples/{rails_root → rails3_root}/script/cucumber +0 -0
- data/examples/rails3_root/script/rails +9 -0
- data/examples/rails3_root/spec/controllers/welcome_controller_spec.rb +20 -0
- data/examples/{rails_root → rails3_root}/spec/models/user_mailer_spec.rb +7 -18
- data/examples/rails3_root/spec/spec_helper.rb +19 -0
- data/examples/sinatra_root/config.ru +4 -0
- data/examples/{sinatra → sinatra_root}/features/errors.feature +0 -0
- data/examples/{rails_root → sinatra_root}/features/example.feature +0 -0
- data/examples/{sinatra → sinatra_root}/features/step_definitions/user_steps.rb +2 -2
- data/examples/sinatra_root/features/step_definitions/web_steps.rb +219 -0
- data/examples/sinatra_root/features/support/env.rb +21 -0
- data/examples/{sinatra → sinatra_root}/features/support/paths.rb +9 -4
- data/examples/sinatra_root/lib/example_sinatra_app.rb +35 -0
- data/lib/email_spec.rb +2 -2
- data/lib/email_spec/deliveries.rb +7 -11
- data/lib/email_spec/email_viewer.rb +1 -1
- data/lib/email_spec/helpers.rb +7 -7
- data/lib/email_spec/mail_ext.rb +11 -0
- data/lib/email_spec/matchers.rb +31 -26
- data/lib/generators/email_spec/steps/USAGE +5 -0
- data/lib/generators/email_spec/steps/steps_generator.rb +14 -0
- data/{examples/rails3_root/features/step_definitions → lib/generators/email_spec/steps/templates}/email_steps.rb +0 -0
- data/spec/email_spec/helpers_spec.rb +4 -6
- data/spec/email_spec/mail_ext_spec.rb +34 -0
- data/spec/email_spec/matchers_spec.rb +227 -37
- data/spec/spec_helper.rb +14 -2
- metadata +174 -207
- data/examples/rails_root/Rakefile +0 -13
- data/examples/rails_root/app/controllers/application_controller.rb +0 -15
- data/examples/rails_root/app/controllers/welcome_controller.rb +0 -16
- data/examples/rails_root/app/helpers/application_helper.rb +0 -3
- data/examples/rails_root/app/helpers/welcome_helper.rb +0 -2
- data/examples/rails_root/app/models/user_mailer.rb +0 -39
- data/examples/rails_root/config/boot.rb +0 -110
- data/examples/rails_root/config/cucumber.yml +0 -7
- data/examples/rails_root/config/environment.rb +0 -28
- data/examples/rails_root/config/environments/cucumber.rb +0 -29
- data/examples/rails_root/config/environments/development.rb +0 -17
- data/examples/rails_root/config/environments/production.rb +0 -28
- data/examples/rails_root/config/environments/test.rb +0 -28
- data/examples/rails_root/config/initializers/new_rails_defaults.rb +0 -17
- data/examples/rails_root/config/routes.rb +0 -45
- data/examples/rails_root/doc/README_FOR_APP +0 -5
- data/examples/rails_root/features/step_definitions/web_steps.rb +0 -273
- data/examples/rails_root/features/support/env_ext.rb +0 -6
- data/examples/rails_root/public/404.html +0 -30
- data/examples/rails_root/public/422.html +0 -30
- data/examples/rails_root/public/500.html +0 -33
- data/examples/rails_root/public/dispatch.rb +0 -10
- data/examples/rails_root/script/about +0 -4
- data/examples/rails_root/script/autospec +0 -5
- data/examples/rails_root/script/console +0 -3
- data/examples/rails_root/script/dbconsole +0 -3
- data/examples/rails_root/script/delayed_job +0 -5
- data/examples/rails_root/script/destroy +0 -3
- data/examples/rails_root/script/generate +0 -3
- data/examples/rails_root/script/performance/benchmarker +0 -3
- data/examples/rails_root/script/performance/profiler +0 -3
- data/examples/rails_root/script/performance/request +0 -3
- data/examples/rails_root/script/plugin +0 -3
- data/examples/rails_root/script/process/inspector +0 -3
- data/examples/rails_root/script/process/reaper +0 -3
- data/examples/rails_root/script/process/spawner +0 -3
- data/examples/rails_root/script/runner +0 -3
- data/examples/rails_root/script/server +0 -3
- data/examples/rails_root/script/spec +0 -5
- data/examples/rails_root/script/spec_server +0 -125
- data/examples/rails_root/spec/controllers/welcome_controller_spec.rb +0 -15
- data/examples/rails_root/spec/model_factory.rb +0 -6
- data/examples/rails_root/spec/models/user_spec.rb +0 -5
- data/examples/rails_root/spec/rcov.opts +0 -2
- data/examples/rails_root/spec/spec.opts +0 -4
- data/examples/rails_root/spec/spec_helper.rb +0 -51
- data/examples/sinatra/app.rb +0 -33
- data/examples/sinatra/features/step_definitions/email_steps.rb +0 -182
- data/examples/sinatra/features/step_definitions/web_steps.rb +0 -273
- data/examples/sinatra/features/support/env.rb +0 -39
- data/examples/sinatra_root/features/step_definitions/email_steps.rb +0 -194
- data/lib/email_spec/#helpers.rb# +0 -168
- 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 =
|
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 =
|
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?(
|
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 =
|
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 =
|
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 =
|
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 =
|
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
|
-
|
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 =
|
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 =
|
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 =
|
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 =
|
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 =
|
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 =
|
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?(
|
129
|
-
matcher.failure_message.should
|
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 =
|
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 =
|
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 =
|
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 =
|
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
|
169
|
-
email =
|
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?(
|
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?(
|
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?(
|
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 =
|
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?(
|
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?(
|
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?(
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
data/spec/spec_helper.rb
CHANGED
@@ -1,4 +1,16 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
require '
|
3
|
-
require '
|
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
|
-
|
5
|
-
|
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:
|
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
|
-
|
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/
|
69
|
-
- examples/
|
70
|
-
- examples/
|
71
|
-
- examples/
|
72
|
-
- examples/
|
73
|
-
- examples/
|
74
|
-
- examples/
|
75
|
-
- examples/
|
76
|
-
- examples/
|
77
|
-
- examples/
|
78
|
-
- examples/
|
79
|
-
- examples/
|
80
|
-
- examples/
|
81
|
-
- examples/
|
82
|
-
- examples/
|
83
|
-
- examples/
|
84
|
-
- examples/
|
85
|
-
- examples/
|
86
|
-
- examples/
|
87
|
-
- examples/
|
88
|
-
- examples/
|
89
|
-
- examples/
|
90
|
-
- examples/
|
91
|
-
- examples/
|
92
|
-
- examples/
|
93
|
-
- examples/
|
94
|
-
- examples/
|
95
|
-
- examples/
|
96
|
-
- examples/
|
97
|
-
- examples/
|
98
|
-
- examples/
|
99
|
-
- examples/
|
100
|
-
- examples/
|
101
|
-
- examples/
|
102
|
-
- examples/
|
103
|
-
- examples/
|
104
|
-
- examples/
|
105
|
-
- examples/
|
106
|
-
- examples/
|
107
|
-
- examples/
|
108
|
-
- examples/
|
109
|
-
- examples/
|
110
|
-
- examples/
|
111
|
-
- examples/
|
112
|
-
- examples/
|
113
|
-
- examples/
|
114
|
-
- examples/
|
115
|
-
- examples/
|
116
|
-
- examples/
|
117
|
-
- examples/
|
118
|
-
- examples/
|
119
|
-
- examples/
|
120
|
-
- examples/
|
121
|
-
- examples/
|
122
|
-
- examples/
|
123
|
-
- examples/
|
124
|
-
- examples/
|
125
|
-
- examples/
|
126
|
-
- examples/
|
127
|
-
- examples/
|
128
|
-
- examples/
|
129
|
-
- examples/
|
130
|
-
- examples/
|
131
|
-
- examples/
|
132
|
-
- examples/
|
133
|
-
- examples/
|
134
|
-
- examples/
|
135
|
-
- examples/
|
136
|
-
- examples/
|
137
|
-
- examples/
|
138
|
-
- examples/
|
139
|
-
- examples/
|
140
|
-
- examples/
|
141
|
-
- examples/
|
142
|
-
- examples/
|
143
|
-
- examples/
|
144
|
-
- examples/
|
145
|
-
- examples/
|
146
|
-
- examples/
|
147
|
-
- examples/
|
148
|
-
- examples/
|
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.
|
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/
|
199
|
-
- examples/
|
200
|
-
- examples/
|
201
|
-
- examples/
|
202
|
-
- examples/
|
203
|
-
- examples/
|
204
|
-
- examples/
|
205
|
-
- examples/
|
206
|
-
- examples/
|
207
|
-
- examples/
|
208
|
-
- examples/
|
209
|
-
- examples/
|
210
|
-
- examples/
|
211
|
-
- examples/
|
212
|
-
- examples/
|
213
|
-
- examples/
|
214
|
-
- examples/
|
215
|
-
- examples/
|
216
|
-
- examples/
|
217
|
-
- examples/
|
218
|
-
- examples/
|
219
|
-
- examples/
|
220
|
-
- examples/
|
221
|
-
- examples/
|
222
|
-
- examples/
|
223
|
-
- examples/
|
224
|
-
- examples/
|
225
|
-
- examples/
|
226
|
-
- examples/
|
227
|
-
- examples/
|
228
|
-
- examples/
|
229
|
-
- examples/
|
230
|
-
- examples/
|
231
|
-
- examples/
|
232
|
-
- examples/
|
233
|
-
- examples/
|
234
|
-
- examples/
|
235
|
-
- examples/
|
236
|
-
- examples/
|
237
|
-
- examples/
|
238
|
-
- examples/
|
239
|
-
- examples/
|
240
|
-
- examples/
|
241
|
-
- examples/
|
242
|
-
- examples/
|
243
|
-
- examples/
|
244
|
-
- examples/
|
245
|
-
- examples/
|
246
|
-
- examples/
|
247
|
-
- examples/
|
248
|
-
- examples/
|
249
|
-
- examples/
|
250
|
-
- examples/
|
251
|
-
- examples/
|
252
|
-
- examples/
|
253
|
-
- examples/
|
254
|
-
- examples/
|
255
|
-
- examples/
|
256
|
-
- examples/
|
257
|
-
- examples/
|
258
|
-
- examples/
|
259
|
-
- examples/
|
260
|
-
- examples/
|
261
|
-
- examples/
|
262
|
-
- examples/
|
263
|
-
- examples/
|
264
|
-
- examples/
|
265
|
-
- examples/
|
266
|
-
- examples/
|
267
|
-
- examples/
|
268
|
-
- examples/
|
269
|
-
- examples/
|
270
|
-
- examples/
|
271
|
-
- examples/
|
272
|
-
- examples/
|
273
|
-
- examples/
|
274
|
-
- examples/
|
275
|
-
- examples/
|
276
|
-
- examples/
|
277
|
-
- examples/
|
278
|
-
- examples/
|
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
|