email_spec 0.3.7 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +4 -0
- data/examples/rails_root/features/step_definitions/email_steps.rb +21 -0
- data/examples/rails_root/log/test.log +328 -0
- data/examples/rails_root/vendor/plugins/email_spec/rails_generators/email_spec/templates/email_steps.rb +21 -0
- data/examples/sinatra/webrat.log +22 -0
- data/lib/email_spec/deliveries.rb +4 -1
- metadata +2 -2
data/History.txt
CHANGED
|
@@ -87,13 +87,34 @@ end
|
|
|
87
87
|
#
|
|
88
88
|
|
|
89
89
|
Then /^(?:I|they) should see "([^"]*?)" in the email subject$/ do |text|
|
|
90
|
+
current_email.should have_subject(text)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
Then /^(?:I|they) should see \/([^"]*?)\/ in the email subject$/ do |text|
|
|
90
94
|
current_email.should have_subject(Regexp.new(text))
|
|
91
95
|
end
|
|
92
96
|
|
|
93
97
|
Then /^(?:I|they) should see "([^"]*?)" in the email body$/ do |text|
|
|
98
|
+
current_email.body.should include(text)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
Then /^(?:I|they) should see \/([^"]*?)\/ in the email body$/ do |text|
|
|
94
102
|
current_email.body.should =~ Regexp.new(text)
|
|
95
103
|
end
|
|
96
104
|
|
|
105
|
+
Then /^(?:I|they) should see the email delivered from "([^"]*?)"$/ do |text|
|
|
106
|
+
current_email.should be_delivered_from(text)
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
Then /^(?:I|they) should see "([^\"]*)" in the email "([^"]*?)" header$/ do |text, name|
|
|
110
|
+
current_email.should have_header(name, text)
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
Then /^(?:I|they) should see \/([^\"]*)\/ in the email "([^"]*?)" header$/ do |text, name|
|
|
114
|
+
current_email.should have_header(name, Regexp.new(text))
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
|
|
97
118
|
# DEPRECATED
|
|
98
119
|
# The following methods are left in for backwards compatibility and
|
|
99
120
|
# should be removed by version 0.4.0.
|
|
@@ -340,3 +340,331 @@ Processing WelcomeController#signup (for 0.0.0.0 at 2009-12-16 23:20:18) [POST]
|
|
|
340
340
|
Parameters: {"Name"=>"Jimmy Bean", "Email"=>"email@example.com"}
|
|
341
341
|
Rendering welcome/signup
|
|
342
342
|
Completed in 3ms (View: 0, DB: 0) | 200 OK [http://test.host/welcome/signup?Email=email%40example.com&Name=Jimmy+Bean]
|
|
343
|
+
[4;36;1mSQL (0.7ms)[0m [0;1m SELECT name
|
|
344
|
+
FROM sqlite_master
|
|
345
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
|
346
|
+
[0m
|
|
347
|
+
[4;35;1mSQL (0.2ms)[0m [0mSELECT version FROM schema_migrations[0m
|
|
348
|
+
Migrating to CreateUsers (20090125013728)
|
|
349
|
+
Migrating to CreateDelayedJobs (20090908054656)
|
|
350
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mselect sqlite_version(*)[0m
|
|
351
|
+
[4;35;1mSQL (0.3ms)[0m [0m SELECT name
|
|
352
|
+
FROM sqlite_master
|
|
353
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
|
354
|
+
[0m
|
|
355
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mSELECT version FROM schema_migrations[0m
|
|
356
|
+
[4;35;1mSQL (0.3ms)[0m [0m SELECT name
|
|
357
|
+
FROM sqlite_master
|
|
358
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
|
359
|
+
[0m
|
|
360
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mPRAGMA index_list("delayed_jobs")[0m
|
|
361
|
+
[4;35;1mSQL (0.1ms)[0m [0mPRAGMA index_list("users")[0m
|
|
362
|
+
REQUESTING PAGE: GET http://www.example.com/newsletter?Email=example%40example.com&Name=Joe+Someone with {} and HTTP headers {}
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
Processing WelcomeController#newsletter (for 127.0.0.1 at 2009-12-23 18:33:56) [GET]
|
|
366
|
+
Parameters: {"Name"=>"Joe Someone", "Email"=>"example@example.com"}
|
|
367
|
+
[4;36;1mDelayed::Job Create (0.4ms)[0m [0;1mINSERT INTO "delayed_jobs" ("locked_by", "updated_at", "handler", "priority", "run_at", "locked_at", "last_error", "attempts", "failed_at", "created_at") VALUES(NULL, '2009-12-24 01:33:56', '--- !ruby/struct:Delayed::PerformableMethod
|
|
368
|
+
object: CLASS:UserMailer
|
|
369
|
+
method: :deliver_newsletter
|
|
370
|
+
args:
|
|
371
|
+
- example@example.com
|
|
372
|
+
- Joe Someone
|
|
373
|
+
', 0, '2009-12-24 01:33:56', NULL, NULL, 0, NULL, '2009-12-24 01:33:56')[0m
|
|
374
|
+
Rendering welcome/newsletter
|
|
375
|
+
Completed in 281ms (View: 3, DB: 20) | 200 OK [http://www.example.com/newsletter?Email=example%40example.com&Name=Joe+Someone]
|
|
376
|
+
* [JOB] acquiring lock on UserMailer.deliver_newsletter
|
|
377
|
+
[4;35;1mDelayed::Job Update (0.1ms)[0m [0mUPDATE "delayed_jobs" SET locked_at = '2009-12-24 01:33:56', locked_by = 'host:Benz pid:5059' WHERE (id = 1 and (locked_at is null or locked_at < '2009-12-23 21:33:56') and (run_at <= '2009-12-24 01:33:56')) [0m
|
|
378
|
+
Sent mail to example@example.com
|
|
379
|
+
|
|
380
|
+
Date: Wed, 23 Dec 2009 18:33:56 -0700
|
|
381
|
+
From: admin@example.com
|
|
382
|
+
To: example@example.com
|
|
383
|
+
Subject: Newsletter sent
|
|
384
|
+
Mime-Version: 1.0
|
|
385
|
+
Content-Type: text/plain; charset=utf-8
|
|
386
|
+
|
|
387
|
+
Hello Joe Someone!
|
|
388
|
+
|
|
389
|
+
This week.....
|
|
390
|
+
.....
|
|
391
|
+
.....
|
|
392
|
+
|
|
393
|
+
Regards
|
|
394
|
+
Rails Example App
|
|
395
|
+
[4;36;1mDelayed::Job Destroy (0.1ms)[0m [0;1mDELETE FROM "delayed_jobs" WHERE "id" = 1[0m
|
|
396
|
+
* [JOB] UserMailer.deliver_newsletter completed after 0.0048
|
|
397
|
+
REQUESTING PAGE: GET / with {} and HTTP headers {}
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
Processing WelcomeController#index (for 127.0.0.1 at 2009-12-23 18:33:56) [GET]
|
|
401
|
+
Rendering welcome/index
|
|
402
|
+
Completed in 2ms (View: 2, DB: 2) | 200 OK [http://www.example.com/]
|
|
403
|
+
REQUESTING PAGE: POST /welcome/signup with {"Name"=>"", "commit"=>"Sign up", "Email"=>"example@example.com"} and HTTP headers {"HTTP_REFERER"=>"/"}
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
Processing WelcomeController#signup (for 127.0.0.1 at 2009-12-23 18:33:56) [POST]
|
|
407
|
+
Parameters: {"Name"=>"", "commit"=>"Sign up", "Email"=>"example@example.com"}
|
|
408
|
+
Sent mail to example@example.com
|
|
409
|
+
|
|
410
|
+
Date: Wed, 23 Dec 2009 18:33:56 -0700
|
|
411
|
+
From: admin@example.com
|
|
412
|
+
To: example@example.com
|
|
413
|
+
Subject: Account confirmation
|
|
414
|
+
Mime-Version: 1.0
|
|
415
|
+
Content-Type: text/plain; charset=utf-8
|
|
416
|
+
|
|
417
|
+
Hello !
|
|
418
|
+
|
|
419
|
+
<a href="http://example.com/confirm">Click here to confirm your account!</a>
|
|
420
|
+
Rendering welcome/signup
|
|
421
|
+
Completed in 5ms (View: 1, DB: 1) | 200 OK [http://www.example.com/welcome/signup]
|
|
422
|
+
REQUESTING PAGE: GET / with {} and HTTP headers {}
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
Processing WelcomeController#index (for 127.0.0.1 at 2009-12-23 18:33:56) [GET]
|
|
426
|
+
Rendering welcome/index
|
|
427
|
+
Completed in 2ms (View: 2, DB: 103) | 200 OK [http://www.example.com/]
|
|
428
|
+
REQUESTING PAGE: POST /welcome/signup with {"Name"=>"", "commit"=>"Sign up", "Email"=>"example@example.com"} and HTTP headers {"HTTP_REFERER"=>"/"}
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
Processing WelcomeController#signup (for 127.0.0.1 at 2009-12-23 18:33:56) [POST]
|
|
432
|
+
Parameters: {"Name"=>"", "commit"=>"Sign up", "Email"=>"example@example.com"}
|
|
433
|
+
Sent mail to example@example.com
|
|
434
|
+
|
|
435
|
+
Date: Wed, 23 Dec 2009 18:33:56 -0700
|
|
436
|
+
From: admin@example.com
|
|
437
|
+
To: example@example.com
|
|
438
|
+
Subject: Account confirmation
|
|
439
|
+
Mime-Version: 1.0
|
|
440
|
+
Content-Type: text/plain; charset=utf-8
|
|
441
|
+
|
|
442
|
+
Hello !
|
|
443
|
+
|
|
444
|
+
<a href="http://example.com/confirm">Click here to confirm your account!</a>
|
|
445
|
+
Rendering welcome/signup
|
|
446
|
+
Completed in 5ms (View: 0, DB: 2) | 200 OK [http://www.example.com/welcome/signup]
|
|
447
|
+
REQUESTING PAGE: GET / with {} and HTTP headers {}
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
Processing WelcomeController#index (for 127.0.0.1 at 2009-12-23 18:33:57) [GET]
|
|
451
|
+
Rendering welcome/index
|
|
452
|
+
Completed in 2ms (View: 1, DB: 318) | 200 OK [http://www.example.com/]
|
|
453
|
+
REQUESTING PAGE: POST /welcome/signup with {"Name"=>"", "commit"=>"Sign up", "Email"=>"example@example.com"} and HTTP headers {"HTTP_REFERER"=>"/"}
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
Processing WelcomeController#signup (for 127.0.0.1 at 2009-12-23 18:33:57) [POST]
|
|
457
|
+
Parameters: {"Name"=>"", "commit"=>"Sign up", "Email"=>"example@example.com"}
|
|
458
|
+
Sent mail to example@example.com
|
|
459
|
+
|
|
460
|
+
Date: Wed, 23 Dec 2009 18:33:57 -0700
|
|
461
|
+
From: admin@example.com
|
|
462
|
+
To: example@example.com
|
|
463
|
+
Subject: Account confirmation
|
|
464
|
+
Mime-Version: 1.0
|
|
465
|
+
Content-Type: text/plain; charset=utf-8
|
|
466
|
+
|
|
467
|
+
Hello !
|
|
468
|
+
|
|
469
|
+
<a href="http://example.com/confirm">Click here to confirm your account!</a>
|
|
470
|
+
Rendering welcome/signup
|
|
471
|
+
Completed in 5ms (View: 1, DB: 1) | 200 OK [http://www.example.com/welcome/signup]
|
|
472
|
+
REQUESTING PAGE: GET / with {} and HTTP headers {}
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
Processing WelcomeController#index (for 127.0.0.1 at 2009-12-23 18:33:57) [GET]
|
|
476
|
+
Rendering welcome/index
|
|
477
|
+
Completed in 2ms (View: 2, DB: 1) | 200 OK [http://www.example.com/]
|
|
478
|
+
REQUESTING PAGE: POST /welcome/signup with {"Name"=>"", "commit"=>"Sign up", "Email"=>"example@example.com"} and HTTP headers {"HTTP_REFERER"=>"/"}
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
Processing WelcomeController#signup (for 127.0.0.1 at 2009-12-23 18:33:57) [POST]
|
|
482
|
+
Parameters: {"Name"=>"", "commit"=>"Sign up", "Email"=>"example@example.com"}
|
|
483
|
+
Sent mail to example@example.com
|
|
484
|
+
|
|
485
|
+
Date: Wed, 23 Dec 2009 18:33:57 -0700
|
|
486
|
+
From: admin@example.com
|
|
487
|
+
To: example@example.com
|
|
488
|
+
Subject: Account confirmation
|
|
489
|
+
Mime-Version: 1.0
|
|
490
|
+
Content-Type: text/plain; charset=utf-8
|
|
491
|
+
|
|
492
|
+
Hello !
|
|
493
|
+
|
|
494
|
+
<a href="http://example.com/confirm">Click here to confirm your account!</a>
|
|
495
|
+
Rendering welcome/signup
|
|
496
|
+
Completed in 4ms (View: 0, DB: 1) | 200 OK [http://www.example.com/welcome/signup]
|
|
497
|
+
REQUESTING PAGE: GET / with {} and HTTP headers {}
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
Processing WelcomeController#index (for 127.0.0.1 at 2009-12-23 18:33:57) [GET]
|
|
501
|
+
Rendering welcome/index
|
|
502
|
+
Completed in 2ms (View: 2, DB: 1) | 200 OK [http://www.example.com/]
|
|
503
|
+
REQUESTING PAGE: POST /welcome/signup with {"Name"=>"", "commit"=>"Sign up", "Email"=>"example@example.com"} and HTTP headers {"HTTP_REFERER"=>"/"}
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
Processing WelcomeController#signup (for 127.0.0.1 at 2009-12-23 18:33:57) [POST]
|
|
507
|
+
Parameters: {"Name"=>"", "commit"=>"Sign up", "Email"=>"example@example.com"}
|
|
508
|
+
Sent mail to example@example.com
|
|
509
|
+
|
|
510
|
+
Date: Wed, 23 Dec 2009 18:33:57 -0700
|
|
511
|
+
From: admin@example.com
|
|
512
|
+
To: example@example.com
|
|
513
|
+
Subject: Account confirmation
|
|
514
|
+
Mime-Version: 1.0
|
|
515
|
+
Content-Type: text/plain; charset=utf-8
|
|
516
|
+
|
|
517
|
+
Hello !
|
|
518
|
+
|
|
519
|
+
<a href="http://example.com/confirm">Click here to confirm your account!</a>
|
|
520
|
+
Rendering welcome/signup
|
|
521
|
+
Completed in 4ms (View: 1, DB: 1) | 200 OK [http://www.example.com/welcome/signup]
|
|
522
|
+
REQUESTING PAGE: GET / with {} and HTTP headers {}
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
Processing WelcomeController#index (for 127.0.0.1 at 2009-12-23 18:33:57) [GET]
|
|
526
|
+
Rendering welcome/index
|
|
527
|
+
Completed in 2ms (View: 1, DB: 1) | 200 OK [http://www.example.com/]
|
|
528
|
+
REQUESTING PAGE: POST /welcome/signup with {"Name"=>"Joe Someone", "commit"=>"Sign up", "Email"=>"example@example.com"} and HTTP headers {"HTTP_REFERER"=>"/"}
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
Processing WelcomeController#signup (for 127.0.0.1 at 2009-12-23 18:33:57) [POST]
|
|
532
|
+
Parameters: {"Name"=>"Joe Someone", "commit"=>"Sign up", "Email"=>"example@example.com"}
|
|
533
|
+
Sent mail to example@example.com
|
|
534
|
+
|
|
535
|
+
Date: Wed, 23 Dec 2009 18:33:57 -0700
|
|
536
|
+
From: admin@example.com
|
|
537
|
+
To: example@example.com
|
|
538
|
+
Subject: Account confirmation
|
|
539
|
+
Mime-Version: 1.0
|
|
540
|
+
Content-Type: text/plain; charset=utf-8
|
|
541
|
+
|
|
542
|
+
Hello Joe Someone!
|
|
543
|
+
|
|
544
|
+
<a href="http://example.com/confirm">Click here to confirm your account!</a>
|
|
545
|
+
Rendering welcome/signup
|
|
546
|
+
Completed in 4ms (View: 0, DB: 0) | 200 OK [http://www.example.com/welcome/signup]
|
|
547
|
+
REQUESTING PAGE: GET /confirm with {} and HTTP headers {"HTTP_REFERER"=>"/welcome/signup"}
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
Processing WelcomeController#confirm (for 127.0.0.1 at 2009-12-23 18:33:57) [GET]
|
|
551
|
+
Rendering welcome/confirm
|
|
552
|
+
Completed in 2ms (View: 1, DB: 2) | 200 OK [http://www.example.com/confirm]
|
|
553
|
+
REQUESTING PAGE: GET / with {} and HTTP headers {}
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
Processing WelcomeController#index (for 127.0.0.1 at 2009-12-23 18:33:57) [GET]
|
|
557
|
+
Rendering welcome/index
|
|
558
|
+
Completed in 2ms (View: 1, DB: 1) | 200 OK [http://www.example.com/]
|
|
559
|
+
REQUESTING PAGE: POST /welcome/signup with {"Name"=>"Joe Someone", "commit"=>"Sign up", "Email"=>"example@example.com"} and HTTP headers {"HTTP_REFERER"=>"/"}
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
Processing WelcomeController#signup (for 127.0.0.1 at 2009-12-23 18:33:57) [POST]
|
|
563
|
+
Parameters: {"Name"=>"Joe Someone", "commit"=>"Sign up", "Email"=>"example@example.com"}
|
|
564
|
+
Sent mail to example@example.com
|
|
565
|
+
|
|
566
|
+
Date: Wed, 23 Dec 2009 18:33:57 -0700
|
|
567
|
+
From: admin@example.com
|
|
568
|
+
To: example@example.com
|
|
569
|
+
Subject: Account confirmation
|
|
570
|
+
Mime-Version: 1.0
|
|
571
|
+
Content-Type: text/plain; charset=utf-8
|
|
572
|
+
|
|
573
|
+
Hello Joe Someone!
|
|
574
|
+
|
|
575
|
+
<a href="http://example.com/confirm">Click here to confirm your account!</a>
|
|
576
|
+
Rendering welcome/signup
|
|
577
|
+
Completed in 4ms (View: 1, DB: 0) | 200 OK [http://www.example.com/welcome/signup]
|
|
578
|
+
REQUESTING PAGE: GET /confirm with {} and HTTP headers {"HTTP_REFERER"=>"/welcome/signup"}
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
Processing WelcomeController#confirm (for 127.0.0.1 at 2009-12-23 18:33:57) [GET]
|
|
582
|
+
Rendering welcome/confirm
|
|
583
|
+
Completed in 1ms (View: 0, DB: 2) | 200 OK [http://www.example.com/confirm]
|
|
584
|
+
REQUESTING PAGE: GET / with {} and HTTP headers {}
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
Processing WelcomeController#index (for 127.0.0.1 at 2009-12-23 18:33:57) [GET]
|
|
588
|
+
Rendering welcome/index
|
|
589
|
+
Completed in 2ms (View: 1, DB: 1) | 200 OK [http://www.example.com/]
|
|
590
|
+
REQUESTING PAGE: POST /welcome/signup with {"Name"=>"Joe Someone", "commit"=>"Sign up", "Email"=>"example@example.com"} and HTTP headers {"HTTP_REFERER"=>"/"}
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
Processing WelcomeController#signup (for 127.0.0.1 at 2009-12-23 18:33:57) [POST]
|
|
594
|
+
Parameters: {"Name"=>"Joe Someone", "commit"=>"Sign up", "Email"=>"example@example.com"}
|
|
595
|
+
Sent mail to example@example.com
|
|
596
|
+
|
|
597
|
+
Date: Wed, 23 Dec 2009 18:33:57 -0700
|
|
598
|
+
From: admin@example.com
|
|
599
|
+
To: example@example.com
|
|
600
|
+
Subject: Account confirmation
|
|
601
|
+
Mime-Version: 1.0
|
|
602
|
+
Content-Type: text/plain; charset=utf-8
|
|
603
|
+
|
|
604
|
+
Hello Joe Someone!
|
|
605
|
+
|
|
606
|
+
<a href="http://example.com/confirm">Click here to confirm your account!</a>
|
|
607
|
+
Rendering welcome/signup
|
|
608
|
+
Completed in 4ms (View: 0, DB: 0) | 200 OK [http://www.example.com/welcome/signup]
|
|
609
|
+
REQUESTING PAGE: GET /confirm with {} and HTTP headers {"HTTP_REFERER"=>"/welcome/signup"}
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
Processing WelcomeController#confirm (for 127.0.0.1 at 2009-12-23 18:33:57) [GET]
|
|
613
|
+
Rendering welcome/confirm
|
|
614
|
+
Completed in 1ms (View: 0, DB: 1) | 200 OK [http://www.example.com/confirm]
|
|
615
|
+
REQUESTING PAGE: GET / with {} and HTTP headers {}
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
Processing WelcomeController#index (for 127.0.0.1 at 2009-12-23 18:33:57) [GET]
|
|
619
|
+
Rendering welcome/index
|
|
620
|
+
Completed in 2ms (View: 1, DB: 1) | 200 OK [http://www.example.com/]
|
|
621
|
+
REQUESTING PAGE: POST /welcome/signup with {"Name"=>"Joe Someone", "commit"=>"Sign up", "Email"=>"example@example.com"} and HTTP headers {"HTTP_REFERER"=>"/"}
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
Processing WelcomeController#signup (for 127.0.0.1 at 2009-12-23 18:33:57) [POST]
|
|
625
|
+
Parameters: {"Name"=>"Joe Someone", "commit"=>"Sign up", "Email"=>"example@example.com"}
|
|
626
|
+
Sent mail to example@example.com
|
|
627
|
+
|
|
628
|
+
Date: Wed, 23 Dec 2009 18:33:57 -0700
|
|
629
|
+
From: admin@example.com
|
|
630
|
+
To: example@example.com
|
|
631
|
+
Subject: Account confirmation
|
|
632
|
+
Mime-Version: 1.0
|
|
633
|
+
Content-Type: text/plain; charset=utf-8
|
|
634
|
+
|
|
635
|
+
Hello Joe Someone!
|
|
636
|
+
|
|
637
|
+
<a href="http://example.com/confirm">Click here to confirm your account!</a>
|
|
638
|
+
Rendering welcome/signup
|
|
639
|
+
Completed in 6ms (View: 0, DB: 0) | 200 OK [http://www.example.com/welcome/signup]
|
|
640
|
+
REQUESTING PAGE: GET /confirm with {} and HTTP headers {"HTTP_REFERER"=>"/welcome/signup"}
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
Processing WelcomeController#confirm (for 127.0.0.1 at 2009-12-23 18:33:57) [GET]
|
|
644
|
+
Rendering welcome/confirm
|
|
645
|
+
Completed in 1ms (View: 0, DB: 1) | 200 OK [http://www.example.com/confirm]
|
|
646
|
+
[4;36;1mSQL (0.6ms)[0m [0;1m SELECT name
|
|
647
|
+
FROM sqlite_master
|
|
648
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
|
649
|
+
[0m
|
|
650
|
+
[4;35;1mSQL (0.2ms)[0m [0mSELECT version FROM schema_migrations[0m
|
|
651
|
+
Migrating to CreateUsers (20090125013728)
|
|
652
|
+
Migrating to CreateDelayedJobs (20090908054656)
|
|
653
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mselect sqlite_version(*)[0m
|
|
654
|
+
[4;35;1mSQL (0.3ms)[0m [0m SELECT name
|
|
655
|
+
FROM sqlite_master
|
|
656
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
|
657
|
+
[0m
|
|
658
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mSELECT version FROM schema_migrations[0m
|
|
659
|
+
[4;35;1mSQL (0.2ms)[0m [0m SELECT name
|
|
660
|
+
FROM sqlite_master
|
|
661
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
|
662
|
+
[0m
|
|
663
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mPRAGMA index_list("delayed_jobs")[0m
|
|
664
|
+
[4;35;1mSQL (0.1ms)[0m [0mPRAGMA index_list("users")[0m
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
Processing WelcomeController#signup (for 0.0.0.0 at 2009-12-23 18:34:08) [POST]
|
|
668
|
+
Parameters: {"Name"=>"Jimmy Bean", "Email"=>"email@example.com"}
|
|
669
|
+
Rendering welcome/signup
|
|
670
|
+
Completed in 2ms (View: 0, DB: 0) | 200 OK [http://test.host/welcome/signup?Email=email%40example.com&Name=Jimmy+Bean]
|
|
@@ -87,13 +87,34 @@ end
|
|
|
87
87
|
#
|
|
88
88
|
|
|
89
89
|
Then /^(?:I|they) should see "([^"]*?)" in the email subject$/ do |text|
|
|
90
|
+
current_email.should have_subject(text)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
Then /^(?:I|they) should see \/([^"]*?)\/ in the email subject$/ do |text|
|
|
90
94
|
current_email.should have_subject(Regexp.new(text))
|
|
91
95
|
end
|
|
92
96
|
|
|
93
97
|
Then /^(?:I|they) should see "([^"]*?)" in the email body$/ do |text|
|
|
98
|
+
current_email.body.should include(text)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
Then /^(?:I|they) should see \/([^"]*?)\/ in the email body$/ do |text|
|
|
94
102
|
current_email.body.should =~ Regexp.new(text)
|
|
95
103
|
end
|
|
96
104
|
|
|
105
|
+
Then /^(?:I|they) should see the email delivered from "([^"]*?)"$/ do |text|
|
|
106
|
+
current_email.should be_delivered_from(text)
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
Then /^(?:I|they) should see "([^\"]*)" in the email "([^"]*?)" header$/ do |text, name|
|
|
110
|
+
current_email.should have_header(name, text)
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
Then /^(?:I|they) should see \/([^\"]*)\/ in the email "([^"]*?)" header$/ do |text, name|
|
|
114
|
+
current_email.should have_header(name, Regexp.new(text))
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
|
|
97
118
|
# DEPRECATED
|
|
98
119
|
# The following methods are left in for backwards compatibility and
|
|
99
120
|
# should be removed by version 0.4.0.
|
data/examples/sinatra/webrat.log
CHANGED
|
@@ -21,3 +21,25 @@ REQUESTING PAGE: GET /confirm with {} and HTTP headers {"HTTP_REFERER"=>"/signup
|
|
|
21
21
|
REQUESTING PAGE: GET / with {} and HTTP headers {}
|
|
22
22
|
REQUESTING PAGE: POST /signup with {"user[name]"=>"Joe Someone", "user[email]"=>"example@example.com"} and HTTP headers {"HTTP_REFERER"=>"/"}
|
|
23
23
|
REQUESTING PAGE: GET /confirm with {} and HTTP headers {"HTTP_REFERER"=>"/signup"}
|
|
24
|
+
REQUESTING PAGE: GET / with {} and HTTP headers {}
|
|
25
|
+
REQUESTING PAGE: POST /signup with {"user[name]"=>nil, "user[email]"=>"example@example.com"} and HTTP headers {"HTTP_REFERER"=>"/"}
|
|
26
|
+
REQUESTING PAGE: GET / with {} and HTTP headers {}
|
|
27
|
+
REQUESTING PAGE: POST /signup with {"user[name]"=>nil, "user[email]"=>"example@example.com"} and HTTP headers {"HTTP_REFERER"=>"/"}
|
|
28
|
+
REQUESTING PAGE: GET / with {} and HTTP headers {}
|
|
29
|
+
REQUESTING PAGE: POST /signup with {"user[name]"=>nil, "user[email]"=>"example@example.com"} and HTTP headers {"HTTP_REFERER"=>"/"}
|
|
30
|
+
REQUESTING PAGE: GET / with {} and HTTP headers {}
|
|
31
|
+
REQUESTING PAGE: POST /signup with {"user[name]"=>nil, "user[email]"=>"example@example.com"} and HTTP headers {"HTTP_REFERER"=>"/"}
|
|
32
|
+
REQUESTING PAGE: GET / with {} and HTTP headers {}
|
|
33
|
+
REQUESTING PAGE: POST /signup with {"user[name]"=>nil, "user[email]"=>"example@example.com"} and HTTP headers {"HTTP_REFERER"=>"/"}
|
|
34
|
+
REQUESTING PAGE: GET / with {} and HTTP headers {}
|
|
35
|
+
REQUESTING PAGE: POST /signup with {"user[name]"=>"Joe Someone", "user[email]"=>"example@example.com"} and HTTP headers {"HTTP_REFERER"=>"/"}
|
|
36
|
+
REQUESTING PAGE: GET /confirm with {} and HTTP headers {"HTTP_REFERER"=>"/signup"}
|
|
37
|
+
REQUESTING PAGE: GET / with {} and HTTP headers {}
|
|
38
|
+
REQUESTING PAGE: POST /signup with {"user[name]"=>"Joe Someone", "user[email]"=>"example@example.com"} and HTTP headers {"HTTP_REFERER"=>"/"}
|
|
39
|
+
REQUESTING PAGE: GET /confirm with {} and HTTP headers {"HTTP_REFERER"=>"/signup"}
|
|
40
|
+
REQUESTING PAGE: GET / with {} and HTTP headers {}
|
|
41
|
+
REQUESTING PAGE: POST /signup with {"user[name]"=>"Joe Someone", "user[email]"=>"example@example.com"} and HTTP headers {"HTTP_REFERER"=>"/"}
|
|
42
|
+
REQUESTING PAGE: GET /confirm with {} and HTTP headers {"HTTP_REFERER"=>"/signup"}
|
|
43
|
+
REQUESTING PAGE: GET / with {} and HTTP headers {}
|
|
44
|
+
REQUESTING PAGE: POST /signup with {"user[name]"=>"Joe Someone", "user[email]"=>"example@example.com"} and HTTP headers {"HTTP_REFERER"=>"/"}
|
|
45
|
+
REQUESTING PAGE: GET /confirm with {} and HTTP headers {"HTTP_REFERER"=>"/signup"}
|
|
@@ -35,7 +35,10 @@ module EmailSpec
|
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
def mailbox_for(address)
|
|
38
|
-
Email.all.select { |email|
|
|
38
|
+
Email.all.select { |email|
|
|
39
|
+
(email.to && email.to.include?(address)) ||
|
|
40
|
+
(email.bcc && email.bcc.include?(address)) ||
|
|
41
|
+
(email.cc && email.cc.include?(address)) }.map{ |email| parse_to_tmail(email) }
|
|
39
42
|
end
|
|
40
43
|
|
|
41
44
|
def parse_to_tmail(email)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: email_spec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ben Mabey
|
|
@@ -11,7 +11,7 @@ autorequire:
|
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
13
|
|
|
14
|
-
date: 2009-12-
|
|
14
|
+
date: 2009-12-23 00:00:00 -07:00
|
|
15
15
|
default_executable:
|
|
16
16
|
dependencies: []
|
|
17
17
|
|