Skip to content
Browse files

bug fix for #set_current_email, and small tweaks to example app

  • Loading branch information...
1 parent 1191457 commit abc590988abd3a8f5a8f45d31cf473bb89390b01 @bmabey bmabey committed Feb 15, 2009
View
9 History.txt
@@ -1,8 +1,13 @@
-(In Git)
- === New features
+(In Git)
+ === New features
+
+== 0.0.8 2008-2-15
+ === New features
* have_body_text, have_header matchers (Luke Melia)
* EmailViewer - opens all sent emails in a given scenario when the environment variables are set. (Luke Melia)
* Added compatibility with using ARMailer in test mode. (Luke Melia)
+ === Bugfixes
+ * set_current_email now works with multiple addresses in To field. (Brian McManus, Ben Mabey)
== 0.0.7 2008-1-20
=== New features
View
2 examples/rails_root/config/environments/test.rb
@@ -29,3 +29,5 @@
config.gem 'cucumber', :source => "http://gems.github.com" # aslakhellesoy-cucumber
config.gem 'nakajima-fixjour', :lib => 'fixjour', :source => "http://gems.github.com" # nakajima-fixjour
+
+
View
12 examples/rails_root/features/example.feature
@@ -9,7 +9,8 @@ As a site manager I want new users
to verify their email address with a confirmation link
Scenario: A new person signs up imperatively
- Given I am at "/"
+ Given I am a real person wanting to sign up for an account
+ And I am at "/"
When I fill in "Email" with "quentin@example.com"
And I fill in "Name" with "Quentin Jones"
@@ -30,7 +31,8 @@ Scenario: A new person signs up imperatively
Scenario: slightly more declarative, but still mostly imperative
- Given I'm on the signup page
+ Given I am a real person wanting to sign up for an account
+ And I'm on the signup page
When I fill in "Email" with "quentin@example.com"
And I fill in "Name" with "Quentin Jones"
@@ -45,8 +47,10 @@ Scenario: slightly more declarative, but still mostly imperative
Then I should see "Confirm your new account"
- Scenario: more declarative
- Given I'm on the signup page
+ Scenario: declarative
+ Given I am a real person wanting to sign up for an account
+ And I'm on the signup page
+
When I submit my registration information
Then I should receive an email with a link to a confirmation page
View
3 examples/rails_root/features/step_definitions/user_steps.rb
@@ -1,3 +1,6 @@
+Given "I am a real person wanting to sign up for an account" do
+ # no-op.. for documentation purposes only!
+end
When /^I submit my registration information$/ do
fill_in "Name", :with => valid_user_attributes[:name]
View
2 examples/rails_root/features/support/env.rb
@@ -16,7 +16,7 @@
require File.expand_path(File.dirname(__FILE__) + '../../../../../lib/email_spec/cucumber.rb')
-require (Rails.root + '/spec/model_factory.rb')
+require File.expand_path(File.dirname(__FILE__) +'/../../spec/model_factory.rb')
World { |world| world.extend(Fixjour) }
View
2 examples/rails_root/spec/spec_helper.rb
@@ -5,7 +5,7 @@
require 'spec'
require 'spec/rails'
-require (Rails.root + '/spec/model_factory.rb')
+require File.expand_path(File.dirname(__FILE__) + "/model_factory.rb")
require (Rails.root + '/../../lib/email_spec/helpers.rb')
require (Rails.root + '/../../lib/email_spec/matchers.rb')
View
6 lib/email_spec/helpers.rb
@@ -112,8 +112,10 @@ def find_email!(address, opts={})
def set_current_email(email)
return unless email
- read_emails_for(email.to) << email
- email_spec_hash[:current_emails][email.to] = email
+ email.to.each do |to|
+ read_emails_for(to) << email
+ email_spec_hash[:current_emails][to] = email
+ end
email_spec_hash[:current_email] = email
end

0 comments on commit abc5909

Please sign in to comment.
Something went wrong with that request. Please try again.