Sha256: ab53d01005ed1c4829121088202d25f3b5872bc7fb0a225f61e990d0985ab20a

Contents?: true

Size: 360 Bytes

Versions: 50

Compression:

Stored size: 360 Bytes

Contents

When /^I follow the link sent to "([^"]+)"$/ do |email_address|
  email = ActionMailer::Base.deliveries.detect do |tmail|
    tmail.to.include?(email_address)
  end or raise "No email sent to #{email_address}"

  unless match = email.body.match(%r{http://\S+})
    raise "No link included in the email:\n#{email.body}"
  end
  url = match[0]

  visit url
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
saucy-0.2.9 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.8.1 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.8 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.7 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.6.1 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.6 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.5 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.4.1 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.4 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.3 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.2 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.1 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.0 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.1.18 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.1.17 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.1.16 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.1.15 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.1.14 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.1.13 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.1.12 lib/generators/saucy/features/templates/step_definitions/email_steps.rb