I''m trying to include capybara into my RSpec integration tests. It seems to work fine with the Cucumber environment but for some reason it''s giving me issues with the Test environment. Here are the steps I''ve followed: 1. Include capybara in the test group of my Gemfile 2. Included "require ''capybara/rails''" in my spec_helper.rb 3. Included "config.gem ''capybara'', :lib => false" in my config/environments/test.tb It doesn''t complain about not being able to find Capybara, yet it still fails my test and gives me an ''undefined method "visit" for #<Spec::Rails.....>" which is the first Capybara specific method in my test. Any other ideas I could try? Thanks ahead of time! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Gintautas Å imkus
2012-Aug-24 14:36 UTC
Re: Rails test environment can''t find capybara methods
Just a random idea, you might need to include a module with those methods in your specs (or in spec_helper). 2012/8/24 Kevin Farst <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>> I''m trying to include capybara into my RSpec integration tests. It seems > to work fine with the Cucumber environment but for some reason it''s > giving me issues with the Test environment. Here are the steps I''ve > followed: > > 1. Include capybara in the test group of my Gemfile > 2. Included "require ''capybara/rails''" in my spec_helper.rb > 3. Included "config.gem ''capybara'', :lib => false" in my > config/environments/test.tb > > It doesn''t complain about not being able to find Capybara, yet it still > fails my test and gives me an ''undefined method "visit" for > #<Spec::Rails.....>" which is the first Capybara specific method in my > test. Any other ideas I could try? Thanks ahead of time! > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Jordon Bedwell
2012-Aug-25 15:39 UTC
Re: Rails test environment can''t find capybara methods
On Friday, 24 August 2012 09:33:10 UTC-5, Ruby-Forum.com User wrote:> > I''m trying to include capybara into my RSpec integration tests. It seems > to work fine with the Cucumber environment but for some reason it''s > giving me issues with the Test environment. Here are the steps I''ve > followed: > > 1. Include capybara in the test group of my Gemfile > 2. Included "require ''capybara/rails''" in my spec_helper.rb > 3. Included "config.gem ''capybara'', :lib => false" in my > config/environments/test.tb > > It doesn''t complain about not being able to find Capybara, yet it still > fails my test and gives me an ''undefined method "visit" for > #<Spec::Rails.....>" which is the first Capybara specific method in my > test. Any other ideas I could try? Thanks ahead of time! >This is related to a bug I reported not too long ago https://github.com/mattheworiordan/capybara-screenshot/issues/24 there is a way you can fix it before they figure out a way to handle the situation elegantly. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/zgR6Wru_w_QJ. For more options, visit https://groups.google.com/groups/opt_out.
Jordon Bedwell
2012-Aug-25 15:43 UTC
Re: Rails test environment can''t find capybara methods
On Saturday, 25 August 2012 10:39:56 UTC-5, Jordon Bedwell wrote:> > On Friday, 24 August 2012 09:33:10 UTC-5, Ruby-Forum.com User wrote: >> >> I''m trying to include capybara into my RSpec integration tests. It seems >> to work fine with the Cucumber environment but for some reason it''s >> giving me issues with the Test environment. Here are the steps I''ve >> followed: >> >> 1. Include capybara in the test group of my Gemfile >> 2. Included "require ''capybara/rails''" in my spec_helper.rb >> 3. Included "config.gem ''capybara'', :lib => false" in my >> config/environments/test.tb >> >> It doesn''t complain about not being able to find Capybara, yet it still >> fails my test and gives me an ''undefined method "visit" for >> #<Spec::Rails.....>" which is the first Capybara specific method in my >> test. Any other ideas I could try? Thanks ahead of time! >> > > This is related to a bug I reported not too long ago > https://github.com/mattheworiordan/capybara-screenshot/issues/24 there is > a way you can fix it before they figure out a way to handle the situation > elegantly. >Sorry ignore this post, I mean to send this to another list so many things open. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/m0CZBVxwwukJ. For more options, visit https://groups.google.com/groups/opt_out.