GithubHelp home page GithubHelp logo

Comments (16)

bcardarella avatar bcardarella commented on August 29, 2024

Can you provide an example of what you're doing in your code along with what version of the gem you are using?

from capybara-email.

kimohashem avatar kimohashem commented on August 29, 2024

I'm using version ~> "2.2.0"

code example:

open_email('[email protected]')
current_email.click_link 'change password'
page.should have_content 'reset password'

but the code crash on click_link and gave me the " undefined method `click_link' for #Mail::Message:0x0000000877db18 " error

from capybara-email.

 avatar commented on August 29, 2024

I'm getting a NotImplementedError for the same thing.

from capybara-email.

bcardarella avatar bcardarella commented on August 29, 2024

Can I get a list of gems you have in your app? I am not able to recreate.

from capybara-email.

 avatar commented on August 29, 2024

Here's my whole gemfile

source 'https://rubygems.org'

ruby '2.0.0'

gem 'bourbon'
gem 'coffee-rails'
gem 'delayed_job_active_record', '>= 4.0.0'
gem 'devise'
gem 'email_validator'
gem 'figaro'
gem 'flutie'
gem 'haml'
gem 'high_voltage'
gem 'jquery-rails'
gem 'neat'
gem 'omniauth'
gem 'pg'
gem 'rack-timeout'
gem 'rails', '>= 4.0.0'
gem 'recipient_interceptor'
gem 'sass-rails'
gem 'simple_form'
gem 'uglifier'
gem 'unicorn'

group :development do
  gem 'better_errors'
  gem 'binding_of_caller'
  gem 'foreman'
end

group :development, :test do
  gem 'factory_girl_rails'
  gem 'rspec-rails', '>= 2.14'
end

group :test do
  gem 'capybara-email'
  gem 'capybara-webkit', '>= 1.0.0'
  gem 'cucumber-rails', :require => false
  gem 'database_cleaner'
  gem 'launchy'
  gem 'shoulda-matchers'
  gem 'simplecov', require: false
  gem 'timecop'
  gem 'webmock'
end

group :staging, :production do
  gem 'newrelic_rpm', '>= 3.6.7'
  gem 'rails_12factor'
end

from capybara-email.

bcardarella avatar bcardarella commented on August 29, 2024

Thank you, we have our open source day on Friday. I'll get to work on this then.

from capybara-email.

dtuite avatar dtuite commented on August 29, 2024

I'm having the same problem with Rails 4.0.2, Capybara 2.1.0 and Capybara Email 2.2.0. You can probably see I'm using Capybara Webkit but the error occurs with both the JS and Ruby drivers. Here's my Gemfile:

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'


# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Turbolinks makes following links in your web application faster. 
# Read more: https://github.com/rails/turbolinks
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'

gem 'capistrano'
gem 'therubyracer'
gem 'httparty'
gem 'mail_view', '~> 1.0.3'
gem 'flakey', '0.6.0' # path: '~/dev/gems/flakey'
gem 'premailer-rails'
gem 'nokogiri'
gem 'whenever', require: false

gem 'foundation-rails'
gem 'foundation_rails_helper'

gem 'sidekiq'
# Sinatra and slim are needed for the sidekiq web interface.
gem 'sinatra', require: false
gem 'sidekiq-failures'
gem 'sidekiq-expected_failures'
gem 'slim'

gem 'rails_admin'
# Only added for RailsAdmin.
gem "devise"
# This is out here because I'm using it in the MailPreview class which is
# loaded in all environments.
gem 'factory_girl_rails', :require => false

gem 'omniauth'
gem 'omniauth-twitter'
gem 'sorcery', github: 'NoamB/sorcery'

gem 'open_uri_redirections'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

group :production, :staging do
  gem 'pg'
  gem 'exception_notification'
end

group :development, :production do
  gem 'thin'
end

group :development do
  gem 'mailcatcher'
end

group :development, :test do
  gem 'sqlite3'
  gem 'rspec-rails'
  gem 'foreman'
end

group :test do
  gem 'capybara-webkit'
  gem 'launchy'
  gem 'database_cleaner'
  gem 'shoulda-matchers'
  gem 'vcr'
  gem 'webmock'
  gem 'timecop'
  gem 'email_spec'
  gem 'capybara-email'
end

from capybara-email.

dtuite avatar dtuite commented on August 29, 2024

Just FYI this persists in 2.2.1

from capybara-email.

sid137 avatar sid137 commented on August 29, 2024

Doing some debugging.. same problem.. in my app, "current_email" is a "Mail::Message", however in the repo tests, current_email is a "Capybara::Node::Email"

capybara-email/spec/email/driver_spec.rb:
screen shot 2014-02-12 at 1 10 15 am

capybara-email:
screen shot 2014-02-12 at 1 11 49 am

maybe the source of the problem?

ruby 2.1, Rails4.1.0.beta, capybara 2.2.1, capybara-email 2.3.0, rspec 3.0.0.beta1

from capybara-email.

sid137 avatar sid137 commented on August 29, 2024

@dtuite Figured out the issue in my case.. this gem's "open_email" method is conflicting with that from "email_spec", and therefore nothing gets loaded.. removing email_spec fixes the problem

from capybara-email.

dtuite avatar dtuite commented on August 29, 2024

@sid137 That sounds likely since I'm using the email_spec gem also. I'll check it out later on and get back to you.

from capybara-email.

dtuite avatar dtuite commented on August 29, 2024

@sid137 @bcardarella Confirmed. Removing email_spec fixes the issue.

from capybara-email.

rsocci avatar rsocci commented on August 29, 2024

@bcardarella still an issue?

from capybara-email.

dtuite avatar dtuite commented on August 29, 2024

@rsocci Fixed for me on 2.3.0

from capybara-email.

eadz avatar eadz commented on August 29, 2024

I have this issue and I'm not using email_spec..

maybe it's because of devise ( the email is a devise email )

gemfile

source 'https://rubygems.org'
gem 'unicorn'
gem 'rails', '4.1.0'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jbuilder', '~> 2.0'
gem 'nokogiri'
gem 'sidekiq'
gem 'sinatra', '>= 1.3.0', :require => nil # for sidekiq
gem 'zurb-foundation'
gem 'jquery-rails'
gem 'pg'
gem 'devise'

group :development do
  gem 'spring'
  gem 'dotenv'
  gem 'rest-client'
  gem 'simplecov', '~> 0.7.1'
  gem 'sprinkle'
end

group :development, :test do
  gem 'rspec-rails', '~> 2.99'
  gem 'rspec', '~> 2.99'
  gem 'rspec-its'
  gem 'cucumber-rails'
  gem 'database_cleaner'
  gem 'capybara-email'
end

group :test do
  gem "fakeredis", :require => "fakeredis/rspec"
end

from capybara-email.

rahilsondhi avatar rahilsondhi commented on August 29, 2024

I have the same problem. It seems capybara-email and email_spec conflict. I need both gems in my project, so my solution is to only include email spec in the specific unit tests I need like this:

include EmailSpec::Helpers
include EmailSpec::Matchers

And include capybara-email in my spec_helper require 'capybara/email/rspec'

from capybara-email.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.