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.28.1 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.31 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.30 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.29 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.28 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.27 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.26 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.25 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.24 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.21 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.20 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.18 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.17 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.16 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.15 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.14 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.13 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.12 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.11 lib/generators/saucy/features/templates/step_definitions/email_steps.rb
saucy-0.2.10 lib/generators/saucy/features/templates/step_definitions/email_steps.rb