email_spec 1.2.1 → 1.4.0

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.
Files changed (97) hide show
  1. data/History.txt +17 -1
  2. data/README.md +340 -0
  3. data/Rakefile +3 -50
  4. data/lib/email_spec.rb +3 -2
  5. data/lib/email_spec/email_viewer.rb +10 -6
  6. data/lib/email_spec/errors.rb +7 -0
  7. data/lib/email_spec/helpers.rb +5 -3
  8. data/lib/email_spec/matchers.rb +166 -66
  9. data/rails_generators/email_spec/templates/email_steps.rb +1 -1
  10. metadata +290 -236
  11. data/README.rdoc +0 -148
  12. data/examples/rails3_root/Gemfile +0 -17
  13. data/examples/rails3_root/Gemfile.lock +0 -135
  14. data/examples/rails3_root/README +0 -5
  15. data/examples/rails3_root/Rakefile +0 -11
  16. data/examples/rails3_root/app/controllers/application_controller.rb +0 -3
  17. data/examples/rails3_root/app/controllers/welcome_controller.rb +0 -16
  18. data/examples/rails3_root/app/helpers/application_helper.rb +0 -2
  19. data/examples/rails3_root/app/mailers/user_mailer.rb +0 -39
  20. data/examples/rails3_root/app/models/user.rb +0 -2
  21. data/examples/rails3_root/app/views/user_mailer/attachments.html.erb +0 -6
  22. data/examples/rails3_root/app/views/user_mailer/newsletter.html.erb +0 -8
  23. data/examples/rails3_root/app/views/user_mailer/signup.html.erb +0 -4
  24. data/examples/rails3_root/app/views/user_mailer/signup.text.erb +0 -4
  25. data/examples/rails3_root/app/views/welcome/attachments.html.erb +0 -0
  26. data/examples/rails3_root/app/views/welcome/confirm.html.erb +0 -1
  27. data/examples/rails3_root/app/views/welcome/index.html.erb +0 -8
  28. data/examples/rails3_root/app/views/welcome/newsletter.html.erb +0 -0
  29. data/examples/rails3_root/app/views/welcome/signup.html.erb +0 -1
  30. data/examples/rails3_root/attachments/document.pdf +0 -0
  31. data/examples/rails3_root/attachments/image.png +0 -0
  32. data/examples/rails3_root/config.ru +0 -4
  33. data/examples/rails3_root/config/application.rb +0 -43
  34. data/examples/rails3_root/config/boot.rb +0 -14
  35. data/examples/rails3_root/config/cucumber.yml +0 -8
  36. data/examples/rails3_root/config/database.yml +0 -25
  37. data/examples/rails3_root/config/environment.rb +0 -6
  38. data/examples/rails3_root/config/environments/development.rb +0 -20
  39. data/examples/rails3_root/config/environments/production.rb +0 -42
  40. data/examples/rails3_root/config/environments/test.rb +0 -30
  41. data/examples/rails3_root/config/initializers/backtrace_silencers.rb +0 -7
  42. data/examples/rails3_root/config/initializers/cookie_verification_secret.rb +0 -7
  43. data/examples/rails3_root/config/initializers/delayed_job.rb +0 -1
  44. data/examples/rails3_root/config/initializers/inflections.rb +0 -10
  45. data/examples/rails3_root/config/initializers/mime_types.rb +0 -5
  46. data/examples/rails3_root/config/initializers/notifier_job.rb +0 -1
  47. data/examples/rails3_root/config/initializers/rspec_generator.rb +0 -6
  48. data/examples/rails3_root/config/initializers/session_store.rb +0 -10
  49. data/examples/rails3_root/config/locales/en.yml +0 -5
  50. data/examples/rails3_root/config/routes.rb +0 -7
  51. data/examples/rails3_root/db/migrate/20090125013728_create_users.rb +0 -11
  52. data/examples/rails3_root/db/migrate/20090908054656_create_delayed_jobs.rb +0 -20
  53. data/examples/rails3_root/db/schema.rb +0 -33
  54. data/examples/rails3_root/db/seeds.rb +0 -7
  55. data/examples/rails3_root/doc/README_FOR_APP +0 -2
  56. data/examples/rails3_root/features/attachments.feature +0 -27
  57. data/examples/rails3_root/features/delayed_job.feature +0 -13
  58. data/examples/rails3_root/features/errors.feature +0 -40
  59. data/examples/rails3_root/features/example.feature +0 -93
  60. data/examples/rails3_root/features/step_definitions/user_steps.rb +0 -26
  61. data/examples/rails3_root/features/step_definitions/web_steps.rb +0 -219
  62. data/examples/rails3_root/features/support/env.rb +0 -58
  63. data/examples/rails3_root/features/support/env_ext.rb +0 -2
  64. data/examples/rails3_root/features/support/paths.rb +0 -33
  65. data/examples/rails3_root/lib/notifier_job.rb +0 -5
  66. data/examples/rails3_root/lib/tasks/cucumber.rake +0 -53
  67. data/examples/rails3_root/lib/tasks/rspec.rake +0 -69
  68. data/examples/rails3_root/public/404.html +0 -26
  69. data/examples/rails3_root/public/422.html +0 -26
  70. data/examples/rails3_root/public/500.html +0 -26
  71. data/examples/rails3_root/public/favicon.ico +0 -0
  72. data/examples/rails3_root/public/images/rails.png +0 -0
  73. data/examples/rails3_root/public/javascripts/application.js +0 -2
  74. data/examples/rails3_root/public/javascripts/controls.js +0 -965
  75. data/examples/rails3_root/public/javascripts/dragdrop.js +0 -974
  76. data/examples/rails3_root/public/javascripts/effects.js +0 -1123
  77. data/examples/rails3_root/public/javascripts/prototype.js +0 -4874
  78. data/examples/rails3_root/public/javascripts/rails.js +0 -109
  79. data/examples/rails3_root/public/robots.txt +0 -5
  80. data/examples/rails3_root/script/cucumber +0 -10
  81. data/examples/rails3_root/script/rails +0 -9
  82. data/examples/rails3_root/spec/controllers/welcome_controller_spec.rb +0 -20
  83. data/examples/rails3_root/spec/models/user_mailer_spec.rb +0 -47
  84. data/examples/rails3_root/spec/spec_helper.rb +0 -19
  85. data/examples/sinatra_root/config.ru +0 -4
  86. data/examples/sinatra_root/features/errors.feature +0 -40
  87. data/examples/sinatra_root/features/example.feature +0 -93
  88. data/examples/sinatra_root/features/step_definitions/user_steps.rb +0 -26
  89. data/examples/sinatra_root/features/step_definitions/web_steps.rb +0 -219
  90. data/examples/sinatra_root/features/support/env.rb +0 -21
  91. data/examples/sinatra_root/features/support/paths.rb +0 -29
  92. data/examples/sinatra_root/lib/example_sinatra_app.rb +0 -45
  93. data/install.rb +0 -0
  94. data/spec/email_spec/helpers_spec.rb +0 -220
  95. data/spec/email_spec/mail_ext_spec.rb +0 -34
  96. data/spec/email_spec/matchers_spec.rb +0 -486
  97. data/spec/spec_helper.rb +0 -16
@@ -1,43 +0,0 @@
1
- require File.expand_path('../boot', __FILE__)
2
-
3
- require 'rails/all'
4
-
5
- # If you have a Gemfile, require the gems listed there, including any gems
6
- # you've limited to :test, :development, or :production.
7
- Bundler.require(:default, Rails.env) if defined?(Bundler)
8
-
9
- module Rails3Root
10
- class Application < Rails::Application
11
- # Settings in config/environments/* take precedence over those specified here.
12
- # Application configuration should go into files in config/initializers
13
- # -- all .rb files in that directory are automatically loaded.
14
-
15
- # Add additional load paths for your own custom dirs
16
- # config.load_paths += %W( #{config.root}/extras )
17
-
18
- # Only load the plugins named here, in the order given (default is alphabetical).
19
- # :all can be used as a placeholder for all plugins not explicitly named
20
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
21
-
22
- # Activate observers that should always be running
23
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
24
-
25
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
26
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
27
- # config.time_zone = 'Central Time (US & Canada)'
28
-
29
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
30
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
31
- # config.i18n.default_locale = :de
32
-
33
- # Configure generators values. Many other options are available, be sure to check the documentation.
34
- # config.generators do |g|
35
- # g.orm :active_record
36
- # g.template_engine :erb
37
- # g.test_framework :test_unit, :fixture => true
38
- # end
39
-
40
- # Configure sensitive parameters which will be filtered from the log file.
41
- config.filter_parameters << :password
42
- end
43
- end
@@ -1,14 +0,0 @@
1
- # Use locked gems if present.
2
- begin
3
- require File.expand_path('../../.bundle/environment', __FILE__)
4
-
5
- rescue LoadError
6
- # Otherwise, use RubyGems.
7
- require 'rubygems'
8
-
9
- # And set up the gems listed in the Gemfile.
10
- if File.exist?(File.expand_path('../../Gemfile', __FILE__))
11
- require 'bundler'
12
- Bundler.setup
13
- end
14
- end
@@ -1,8 +0,0 @@
1
- <%
2
- rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
3
- rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
4
- std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} --strict --tags ~@wip"
5
- %>
6
- default: <%= std_opts %> features
7
- wip: --tags @wip:3 --wip features
8
- rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
@@ -1,25 +0,0 @@
1
- # SQLite version 3.x
2
- # gem install sqlite3-ruby (not necessary on OS X Leopard)
3
- development:
4
- adapter: sqlite3
5
- database: db/development.sqlite3
6
- pool: 5
7
- timeout: 5000
8
-
9
- # Warning: The database defined as "test" will be erased and
10
- # re-generated from your development database when you run "rake".
11
- # Do not set this db to the same as development or production.
12
- test: &TEST
13
- adapter: sqlite3
14
- database: db/test.sqlite3
15
- pool: 5
16
- timeout: 5000
17
-
18
- production:
19
- adapter: sqlite3
20
- database: db/production.sqlite3
21
- pool: 5
22
- timeout: 5000
23
-
24
- cucumber:
25
- <<: *TEST
@@ -1,6 +0,0 @@
1
- # Load the rails application
2
- require File.expand_path('../application', __FILE__)
3
-
4
- # Initialize the rails application
5
- Rails3Root::Application.initialize!
6
- ActionMailer::Base.default_url_options = { :host => 'example.com' }
@@ -1,20 +0,0 @@
1
- Rails3Root::Application.configure do
2
- # Settings specified here will take precedence over those in config/environment.rb
3
-
4
- # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
6
- # since you don't have to restart the webserver when you make code changes.
7
- config.cache_classes = false
8
-
9
- # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
11
-
12
- # Show full error reports and disable caching
13
- config.consider_all_requests_local = true
14
- config.action_view.debug_rjs = true
15
- config.action_controller.perform_caching = false
16
-
17
- # Don't care if the mailer can't send
18
- config.action_mailer.raise_delivery_errors = false
19
- config.active_support.deprecation = :stderr
20
- end
@@ -1,42 +0,0 @@
1
- Rails3Root::Application.configure do
2
- # Settings specified here will take precedence over those in config/environment.rb
3
-
4
- # The production environment is meant for finished, "live" apps.
5
- # Code is not reloaded between requests
6
- config.cache_classes = true
7
-
8
- # Full error reports are disabled and caching is turned on
9
- config.consider_all_requests_local = false
10
- config.action_controller.perform_caching = true
11
-
12
- # Specifies the header that your server uses for sending files
13
- config.action_dispatch.x_sendfile_header = "X-Sendfile"
14
-
15
- # For nginx:
16
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
17
-
18
- # If you have no front-end server that supports something like X-Sendfile,
19
- # just comment this out and Rails will serve the files
20
-
21
- # See everything in the log (default is :info)
22
- # config.log_level = :debug
23
-
24
- # Use a different logger for distributed setups
25
- # config.logger = SyslogLogger.new
26
-
27
- # Use a different cache store in production
28
- # config.cache_store = :mem_cache_store
29
-
30
- # Disable Rails's static asset server
31
- # In production, Apache or nginx will already do this
32
- config.serve_static_assets = false
33
-
34
- # Enable serving of images, stylesheets, and javascripts from an asset server
35
- # config.action_controller.asset_host = "http://assets.example.com"
36
-
37
- # Disable delivery errors, bad email addresses will be ignored
38
- # config.action_mailer.raise_delivery_errors = false
39
-
40
- # Enable threaded mode
41
- # config.threadsafe!
42
- end
@@ -1,30 +0,0 @@
1
- Rails3Root::Application.configure do
2
- # Settings specified here will take precedence over those in config/environment.rb
3
-
4
- # The test environment is used exclusively to run your application's
5
- # test suite. You never need to work with it otherwise. Remember that
6
- # your test database is "scratch space" for the test suite and is wiped
7
- # and recreated between test runs. Don't rely on the data there!
8
- config.cache_classes = true
9
-
10
- # Log error messages when you accidentally call methods on nil.
11
- config.whiny_nils = true
12
-
13
- # Show full error reports and disable caching
14
- config.consider_all_requests_local = true
15
- config.action_controller.perform_caching = false
16
-
17
- # Disable request forgery protection in test environment
18
- config.action_controller.allow_forgery_protection = false
19
-
20
- # Tell Action Mailer not to deliver emails to the real world.
21
- # The :test delivery method accumulates sent emails in the
22
- # ActionMailer::Base.deliveries array.
23
- config.action_mailer.delivery_method = :test
24
-
25
- # Use SQL instead of Active Record's schema dumper when creating the test database.
26
- # This is necessary if your schema can't be completely dumped by the schema dumper,
27
- # like if you have constraints or database-specific column types
28
- # config.active_record.schema_format = :sql
29
- config.active_support.deprecation = :stderr
30
- end
@@ -1,7 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
- # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
-
6
- # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
- # Rails.backtrace_cleaner.remove_silencers!
@@ -1,7 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key for verifying the integrity of signed cookies.
4
- # If you change this key, all old signed cookies will become invalid!
5
- # Make sure the secret is at least 30 characters and all random,
6
- # no regular words or you'll be exposed to dictionary attacks.
7
- Rails.application.config.secret_token = 'c63e0079364c42f86ef0256e8eb5e8f6993b30f1e64e4374f5211ddf4efdcd0895282c6383bd58dc817716b7ecc15f52de122e2df27fa326266d4163e4e5fe7d'
@@ -1 +0,0 @@
1
- Delayed::Worker.backend = :active_record
@@ -1,10 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new inflection rules using the following format
4
- # (all these examples are active by default):
5
- # ActiveSupport::Inflector.inflections do |inflect|
6
- # inflect.plural /^(ox)$/i, '\1en'
7
- # inflect.singular /^(ox)en/i, '\1'
8
- # inflect.irregular 'person', 'people'
9
- # inflect.uncountable %w( fish sheep )
10
- # end
@@ -1,5 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new mime types for use in respond_to blocks:
4
- # Mime::Type.register "text/richtext", :rtf
5
- # Mime::Type.register_alias "text/html", :iphone
@@ -1 +0,0 @@
1
- require 'notifier_job'
@@ -1,6 +0,0 @@
1
- Rails3Root::Application.configure do
2
- config.generators do |g|
3
- g.integration_tool :rspec
4
- g.test_framework :rspec
5
- end
6
- end
@@ -1,10 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- Rails.application.config.session_store :cookie_store, {
4
- :key => '_rails3_root_session',
5
- }
6
-
7
- # Use the database for sessions instead of the cookie-based default,
8
- # which shouldn't be used to store highly confidential information
9
- # (create the session table with "rake db:sessions:create")
10
- # Rails.application.config.session_store :active_record_store
@@ -1,5 +0,0 @@
1
- # Sample localization file for English. Add more files in this directory for other locales.
2
- # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
-
4
- en:
5
- hello: "Hello world"
@@ -1,7 +0,0 @@
1
- Rails3Root::Application.routes.draw do
2
- root :to => "welcome#index"
3
- match "/confirm" => "welcome#confirm", :as => :confirm_account
4
- match "/newsletter" => "welcome#newsletter", :as => :request_newsletter
5
- match "/attachments" => "welcome#attachments", :as => :request_attachments
6
- match "/welcome/signup" => "welcome#signup"
7
- end
@@ -1,11 +0,0 @@
1
- class CreateUsers < ActiveRecord::Migration
2
- def self.up
3
- create_table :users do |t|
4
- t.string :email, :name
5
- end
6
- end
7
-
8
- def self.down
9
- drop_table :users
10
- end
11
- end
@@ -1,20 +0,0 @@
1
- class CreateDelayedJobs < ActiveRecord::Migration
2
- def self.up
3
- create_table :delayed_jobs, :force => true do |table|
4
- table.integer :priority, :default => 0 # Allows some jobs to jump to the front of the queue
5
- table.integer :attempts, :default => 0 # Provides for retries, but still fail eventually.
6
- table.text :handler # YAML-encoded string of the object that will do work
7
- table.text :last_error # reason for last failure (See Note below)
8
- table.datetime :run_at # When to run. Could be Time.now for immediately, or sometime in the future.
9
- table.datetime :locked_at # Set when a client is working on this object
10
- table.datetime :failed_at # Set when all retries have failed (actually, by default, the record is deleted instead)
11
- table.string :locked_by # Who is working on this object (if locked)
12
- table.timestamps
13
- end
14
-
15
- end
16
-
17
- def self.down
18
- drop_table :delayed_jobs
19
- end
20
- end
@@ -1,33 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # Note that this schema.rb definition is the authoritative source for your
6
- # database schema. If you need to create the application database on another
7
- # system, you should be using db:schema:load, not running all the migrations
8
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
9
- # you'll amass, the slower it'll run and the greater likelihood for issues).
10
- #
11
- # It's strongly recommended to check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(:version => 20090908054656) do
14
-
15
- create_table "delayed_jobs", :force => true do |t|
16
- t.integer "priority", :default => 0
17
- t.integer "attempts", :default => 0
18
- t.text "handler"
19
- t.text "last_error"
20
- t.datetime "run_at"
21
- t.datetime "locked_at"
22
- t.datetime "failed_at"
23
- t.string "locked_by"
24
- t.datetime "created_at"
25
- t.datetime "updated_at"
26
- end
27
-
28
- create_table "users", :force => true do |t|
29
- t.string "email"
30
- t.string "name"
31
- end
32
-
33
- end
@@ -1,7 +0,0 @@
1
- # This file should contain all the record creation needed to seed the database with its default values.
2
- # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
- #
4
- # Examples:
5
- #
6
- # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
7
- # Mayor.create(:name => 'Daley', :city => cities.first)
@@ -1,2 +0,0 @@
1
- Use this README file to introduce your application and point to useful places in the API for learning more.
2
- Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
@@ -1,27 +0,0 @@
1
- Feature: Attachment testing support
2
- In order for developers to test attachments in emails
3
- I want to be able to provide working steps which inspect attachments
4
-
5
- Scenario: Email with Attachments
6
- Given no emails have been sent
7
- And I go to request attachments be sent to me
8
- Then I should receive an email
9
- When I open the email
10
- Then I should see 2 attachments with the email
11
- And there should be an attachment named "image.png"
12
- And there should be an attachment named "document.pdf"
13
- And attachment 1 should be named "image.png"
14
- And attachment 2 should be named "document.pdf"
15
- And there should be an attachment of type "image/png"
16
- And there should be an attachment of type "application/pdf"
17
- And attachment 1 should be of type "image/png"
18
- And attachment 2 should be of type "application/pdf"
19
- And all attachments should not be blank
20
-
21
- Scenario: Email without Attachments
22
- Given no emails have been sent
23
- And I am on the homepage
24
- And I submit my registration information
25
- Then I should receive an email
26
- When I open the email
27
- Then I should see no attachments with the email
@@ -1,13 +0,0 @@
1
- Feature: Delayed Job support
2
- In order for developers using delayed_job to test emails
3
- I want to be able to provide a compatibility layer, which
4
- should run all delayed jobs before checking email boxes
5
- In order to populate deliveries done via send_later
6
-
7
- Scenario: Newsletter
8
- Given no emails have been sent
9
- And I go to request a newsletter
10
- Then I should receive an email
11
- And I should have 1 email
12
- When I open the email
13
- Then I should see "Newsletter sent" in the email subject
@@ -1,40 +0,0 @@
1
- Feature: Email-spec errors example
2
- In order to help alleviate email testing in apps
3
- As a email-spec contributor I a newcomer
4
- Should be able to easily determine where I have gone wrong
5
- These scenarios should fail with helpful messages
6
-
7
- Background:
8
- Given I am on the homepage
9
- And no emails have been sent
10
- When I fill in "Email" with "example@example.com"
11
- And I press "Sign up"
12
-
13
- Scenario: I fail to open an email with incorrect subject
14
- Then I should receive an email
15
- When "example@example.com" opens the email with subject "no email"
16
-
17
- Scenario: I fail to open an email with incorrect subject
18
- Then I should receive an email
19
- When "example@example.com" opens the email with subject /no email/
20
-
21
- Scenario: I fail to open an email with incorrect text
22
- Then I should receive an email
23
- When "example@example.com" opens the email with text "no email"
24
-
25
- Scenario: I fail to open an email with incorrect text
26
- Then I should receive an email
27
- When "example@example.com" opens the email with text /no email/
28
-
29
- Scenario: I fail to receive an email with the expected link
30
- Then I should receive an email
31
- When I open the email
32
- When I follow "link that doesn't exist" in the email
33
-
34
- Scenario: I attempt to operate on an email that is not opened
35
- Then I should receive an email
36
- When I follow "confirm" in the email
37
-
38
- Scenario: I attempt to check out an unopened email
39
- Then I should see "confirm" in the email body
40
- And I should see "Account confirmation" in the email subject
@@ -1,93 +0,0 @@
1
- Feature: EmailSpec Example -- Prevent Bots from creating accounts
2
-
3
- In order to help alleviate email testing in apps
4
- As an email-spec contributor I want new users of the library
5
- to easily adopt email-spec in their app by following this example
6
-
7
- In order to prevent bots from setting up new accounts
8
- As a site manager I want new users
9
- to verify their email address with a confirmation link
10
-
11
- Background:
12
- Given no emails have been sent
13
- And I am a real person wanting to sign up for an account
14
- And I am on the homepage
15
- And I submit my registration information
16
-
17
- Scenario: First person signup (as myself) with three ways of opening email
18
- Then I should receive an email
19
- And I should have 1 email
20
-
21
- # Opening email #1
22
- When I open the email
23
- Then I should see "Account confirmation" in the email subject
24
- And I should see "Joe Someone" in the email body
25
- And I should see "confirm" in the email body
26
-
27
- # Opening email #2
28
- When I open the email with subject "Account confirmation"
29
- Then I should see "Account confirmation" in the email subject
30
- And I should see "Joe Someone" in the email body
31
- And I should see "confirm" in the email body
32
-
33
- # Opening email #3
34
- When I open the email with subject /Account confirmation/
35
- Then I should see "Account confirmation" in the email subject
36
- And I should see "Joe Someone" in the email body
37
- And I should see "confirm" in the email body
38
-
39
- When I follow "Click here to confirm your account!" in the email
40
- Then I should see "Confirm your new account"
41
-
42
- And "foo@bar.com" should have no emails
43
-
44
- Scenario: Third person signup (emails sent to others) with three ways of opening email
45
- Then "foo@bar.com" should have no emails
46
- And "example@example.com" should receive an email
47
- And "example@example.com" should have 1 email
48
-
49
- # Opening email #1
50
- When they open the email
51
- Then they should see "Account confirmation" in the email subject
52
- And they should see "Joe Someone" in the email body
53
- And they should see "confirm" in the email body
54
-
55
- # Opening email #2
56
- When "example@example.com" opens the email with subject "Account confirmation"
57
- Then they should see "Account confirmation" in the email subject
58
- And they should see "Joe Someone" in the email body
59
- And they should see "confirm" in the email body
60
-
61
- # Opening email #3
62
- When "example@example.com" opens the email with subject /Account confirmation/
63
- Then they should see "Account confirmation" in the email subject
64
- And they should see "Joe Someone" in the email body
65
- And they should see "confirm" in the email body
66
-
67
- When they follow "Click here to confirm your account!" in the email
68
- Then they should see "Confirm your new account"
69
-
70
- Scenario: Declarative First Person signup
71
- Then I should receive an email with a link to a confirmation page
72
-
73
- Scenario: Declarative First Person signup
74
- Then they should receive an email with a link to a confirmation page
75
-
76
- Scenario: Checking for text in different parts
77
- Then I should receive an email
78
- And I should have 1 email
79
-
80
- # Opening email #1
81
- When I open the email
82
- Then I should see "This is the HTML part" in the email html part body
83
- And I should see "This is the text part" in the email text part body
84
-
85
- # Opening email #2
86
- When I open the email with text "This is the HTML part"
87
- Then I should see "This is the HTML part" in the email html part body
88
- And I should see "This is the text part" in the email text part body
89
-
90
- # Opening email #3
91
- When I open the email with text /This is the HTML part/
92
- Then I should see "This is the HTML part" in the email html part body
93
- And I should see "This is the text part" in the email text part body