bmabey-email_spec 0.1.2 → 0.1.3

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 CHANGED
@@ -3,6 +3,12 @@
3
3
  === New features
4
4
  === Bufixes
5
5
 
6
+ == 0.1.3 2009-4-15
7
+
8
+ === Bufixes
9
+ * Fixed regular expressions in genertaed steps. (Ben Mabey)
10
+ * World semantics changed in cucumber (0.2.3.2), email_spec now uses the new API. (Hector Morales)
11
+
6
12
  == 0.1.2 2009-4-05
7
13
 
8
14
  === New features
@@ -18,7 +18,7 @@ module EmailHelpers
18
18
  "quentin@example.com" # Replace with your a way to find your current_email. e.g current_user.email
19
19
  end
20
20
  end
21
- World {|world| world.extend EmailHelpers }
21
+ World(EmailHelpers)
22
22
 
23
23
  # Use this step to reset the e-mail queue within a scenario.
24
24
  # This is done automatically before each scenario.
@@ -31,7 +31,7 @@ When /^I open the email$/ do
31
31
  open_email(current_email_address)
32
32
  end
33
33
 
34
- When /^I follow "(.*)" in the email$/ do |link|
34
+ When %r{^I follow "([^"]*?)" in the email$} do |link|
35
35
  visit_in_email(link)
36
36
  end
37
37
 
@@ -40,31 +40,31 @@ Then /^I should receive (an|\d+) emails?$/ do |amount|
40
40
  unread_emails_for(current_email_address).size.should == amount.to_i
41
41
  end
42
42
 
43
- Then /^"([^']*?)" should receive (\d+) emails?$/ do |address, n|
43
+ Then %r{^"([^"]*?)" should receive (\d+) emails?$} do |address, n|
44
44
  unread_emails_for(address).size.should == n.to_i
45
45
  end
46
46
 
47
- Then /^"([^']*?)" should have (\d+) emails?$/ do |address, n|
47
+ Then %r{^"([^"]*?)" should have (\d+) emails?$} do |address, n|
48
48
  mailbox_for(address).size.should == n.to_i
49
49
  end
50
50
 
51
- Then /^"([^']*?)" should not receive an email$/ do |address|
51
+ Then %r{^"([^"]*?)" should not receive an email$} do |address|
52
52
  find_email(address).should be_nil
53
53
  end
54
54
 
55
- Then /^I should see "(.*)" in the subject$/ do |text|
55
+ Then %r{^I should see "([^"]*?)" in the subject$} do |text|
56
56
  current_email.should have_subject(Regexp.new(text))
57
57
  end
58
58
 
59
- Then /^I should see "(.*)" in the email$/ do |text|
59
+ Then %r{^I should see "([^"]*?)" in the email$} do |text|
60
60
  current_email.body.should =~ Regexp.new(text)
61
61
  end
62
62
 
63
- When %r{^"([^']*?)" opens? the email with subject "([^']*?)"$} do |address, subject|
63
+ When %r{^"([^"]*?)" opens? the email with subject "([^"]*?)"$} do |address, subject|
64
64
  open_email(address, :with_subject => subject)
65
65
  end
66
66
 
67
- When %r{^"([^']*?)" opens? the email with text "([^']*?)"$} do |address, text|
67
+ When %r{^"([^"]*?)" opens? the email with text "([^"]*?)"$} do |address, text|
68
68
  open_email(address, :with_text => text)
69
69
  end
70
70
 
@@ -18,6 +18,4 @@ require File.expand_path(File.dirname(__FILE__) + '../../../../../lib/email_spec
18
18
  require 'email_spec/cucumber'
19
19
 
20
20
  require File.expand_path(File.dirname(__FILE__) +'/../../spec/model_factory.rb')
21
- World { |world| world.extend(Fixjour) }
22
-
23
-
21
+ World(Fixjour)
@@ -18,7 +18,7 @@ module EmailHelpers
18
18
  "quentin@example.com" # Replace with your a way to find your current_email. e.g current_user.email
19
19
  end
20
20
  end
21
- World {|world| world.extend EmailHelpers }
21
+ World(EmailHelpers)
22
22
 
23
23
  # Use this step to reset the e-mail queue within a scenario.
24
24
  # This is done automatically before each scenario.
@@ -31,7 +31,7 @@ When /^I open the email$/ do
31
31
  open_email(current_email_address)
32
32
  end
33
33
 
34
- When /^I follow "(.*)" in the email$/ do |link|
34
+ When %r{^I follow "([^"]*?)" in the email$} do |link|
35
35
  visit_in_email(link)
36
36
  end
37
37
 
@@ -40,31 +40,31 @@ Then /^I should receive (an|\d+) emails?$/ do |amount|
40
40
  unread_emails_for(current_email_address).size.should == amount.to_i
41
41
  end
42
42
 
43
- Then /^"([^']*?)" should receive (\d+) emails?$/ do |address, n|
43
+ Then %r{^"([^"]*?)" should receive (\d+) emails?$} do |address, n|
44
44
  unread_emails_for(address).size.should == n.to_i
45
45
  end
46
46
 
47
- Then /^"([^']*?)" should have (\d+) emails?$/ do |address, n|
47
+ Then %r{^"([^"]*?)" should have (\d+) emails?$} do |address, n|
48
48
  mailbox_for(address).size.should == n.to_i
49
49
  end
50
50
 
51
- Then /^"([^']*?)" should not receive an email$/ do |address|
51
+ Then %r{^"([^"]*?)" should not receive an email$} do |address|
52
52
  find_email(address).should be_nil
53
53
  end
54
54
 
55
- Then /^I should see "(.*)" in the subject$/ do |text|
55
+ Then %r{^I should see "([^"]*?)" in the subject$} do |text|
56
56
  current_email.should have_subject(Regexp.new(text))
57
57
  end
58
58
 
59
- Then /^I should see "(.*)" in the email$/ do |text|
59
+ Then %r{^I should see "([^"]*?)" in the email$} do |text|
60
60
  current_email.body.should =~ Regexp.new(text)
61
61
  end
62
62
 
63
- When %r{^"([^']*?)" opens? the email with subject "([^']*?)"$} do |address, subject|
63
+ When %r{^"([^"]*?)" opens? the email with subject "([^"]*?)"$} do |address, subject|
64
64
  open_email(address, :with_subject => subject)
65
65
  end
66
66
 
67
- When %r{^"([^']*?)" opens? the email with text "([^']*?)"$} do |address, text|
67
+ When %r{^"([^"]*?)" opens? the email with text "([^"]*?)"$} do |address, text|
68
68
  open_email(address, :with_text => text)
69
69
  end
70
70
 
@@ -15,7 +15,5 @@ After do
15
15
  EmailSpec::EmailViewer.save_and_open_all_text_emails if ENV['SHOW_TEXT_EMAILS']
16
16
  end
17
17
 
18
- World do |world|
19
- world.extend EmailSpec::Helpers
20
- world.extend EmailSpec::Matchers
21
- end
18
+ World(EmailSpec::Helpers)
19
+ World(EmailSpec::Matchers)
@@ -18,7 +18,7 @@ module EmailHelpers
18
18
  "quentin@example.com" # Replace with your a way to find your current_email. e.g current_user.email
19
19
  end
20
20
  end
21
- World {|world| world.extend EmailHelpers }
21
+ World(EmailHelpers)
22
22
 
23
23
  # Use this step to reset the e-mail queue within a scenario.
24
24
  # This is done automatically before each scenario.
@@ -31,7 +31,7 @@ When /^I open the email$/ do
31
31
  open_email(current_email_address)
32
32
  end
33
33
 
34
- When /^I follow "(.*)" in the email$/ do |link|
34
+ When %r{^I follow "([^"]*?)" in the email$} do |link|
35
35
  visit_in_email(link)
36
36
  end
37
37
 
@@ -40,31 +40,31 @@ Then /^I should receive (an|\d+) emails?$/ do |amount|
40
40
  unread_emails_for(current_email_address).size.should == amount.to_i
41
41
  end
42
42
 
43
- Then /^"([^']*?)" should receive (\d+) emails?$/ do |address, n|
43
+ Then %r{^"([^"]*?)" should receive (\d+) emails?$} do |address, n|
44
44
  unread_emails_for(address).size.should == n.to_i
45
45
  end
46
46
 
47
- Then /^"([^']*?)" should have (\d+) emails?$/ do |address, n|
47
+ Then %r{^"([^"]*?)" should have (\d+) emails?$} do |address, n|
48
48
  mailbox_for(address).size.should == n.to_i
49
49
  end
50
50
 
51
- Then /^"([^']*?)" should not receive an email$/ do |address|
51
+ Then %r{^"([^"]*?)" should not receive an email$} do |address|
52
52
  find_email(address).should be_nil
53
53
  end
54
54
 
55
- Then /^I should see "(.*)" in the subject$/ do |text|
55
+ Then %r{^I should see "([^"]*?)" in the subject$} do |text|
56
56
  current_email.should have_subject(Regexp.new(text))
57
57
  end
58
58
 
59
- Then /^I should see "(.*)" in the email$/ do |text|
59
+ Then %r{^I should see "([^"]*?)" in the email$} do |text|
60
60
  current_email.body.should =~ Regexp.new(text)
61
61
  end
62
62
 
63
- When %r{^"([^']*?)" opens? the email with subject "([^']*?)"$} do |address, subject|
63
+ When %r{^"([^"]*?)" opens? the email with subject "([^"]*?)"$} do |address, subject|
64
64
  open_email(address, :with_subject => subject)
65
65
  end
66
66
 
67
- When %r{^"([^']*?)" opens? the email with text "([^']*?)"$} do |address, text|
67
+ When %r{^"([^"]*?)" opens? the email with text "([^"]*?)"$} do |address, text|
68
68
  open_email(address, :with_text => text)
69
69
  end
70
70
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bmabey-email_spec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
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-04-05 00:00:00 -07:00
14
+ date: 2009-04-16 00:00:00 -07:00
15
15
  default_executable:
16
16
  dependencies: []
17
17
 
@@ -79,11 +79,9 @@ files:
79
79
  - examples/rails_root/config/routes.rb
80
80
  - examples/rails_root/cucumber.yml
81
81
  - examples/rails_root/db
82
- - examples/rails_root/db/development.sqlite3
83
82
  - examples/rails_root/db/migrate
84
83
  - examples/rails_root/db/migrate/20090125013728_create_users.rb
85
84
  - examples/rails_root/db/schema.rb
86
- - examples/rails_root/db/test.sqlite3
87
85
  - examples/rails_root/doc
88
86
  - examples/rails_root/doc/README_FOR_APP
89
87
  - examples/rails_root/features
@@ -95,10 +93,6 @@ files:
95
93
  - examples/rails_root/features/step_definitions/webrat_steps.rb
96
94
  - examples/rails_root/features/support
97
95
  - examples/rails_root/features/support/env.rb
98
- - examples/rails_root/lib
99
- - examples/rails_root/log
100
- - examples/rails_root/log/development.log
101
- - examples/rails_root/log/test.log
102
96
  - examples/rails_root/public
103
97
  - examples/rails_root/public/404.html
104
98
  - examples/rails_root/public/422.html
@@ -181,7 +175,7 @@ requirements: []
181
175
  rubyforge_project:
182
176
  rubygems_version: 1.2.0
183
177
  signing_key:
184
- specification_version: 2
178
+ specification_version: 3
185
179
  summary: Easily test email in rspec and cucumber
186
180
  test_files: []
187
181