Skip to content

Instructions for inclusion with Rspec #3

brendon opened this Issue Jul 16, 2012 · 5 comments

2 participants

brendon commented Jul 16, 2012

Hi there, I feel a bit dense but I'm not sure how to integrate this with Rspec and capybara. The file you mention in your README doesn't exist in my setup :)

Any help would be greatly received :D

@despo despo was assigned Jul 18, 2012
ExtractMethod LTD member
despo commented Jul 18, 2012

Hi @brendon

I use rspec to test prickle, so have a look in the rspec_helper.rb

Let me know if this helps.

ExtractMethod LTD member
despo commented Jul 31, 2012

@brendon prickle supports any Capybara driver and also has usage for selenium popups - in case you change your mind :)

@despo despo closed this Jul 31, 2012
brendon commented Oct 10, 2012

Hi Despo, I'm just revisiting this issue and I can see that you create a new class that you include the capybara dsl and prickle methods into but using capybara with rspec normally doesn't require the use of a special class (i.e. you can just call page.should_not have_content('First Site') and it'll work in a spec. Your tests that you mention use the prickly class instance to encapsulate this a bit.

I've found that including prickle directly in a support file in rspec pollutes the namespace so that ActiveRecord's find_by_name meta-method gets overridden with yours.

How would one extent the capybara dsl with prickle without causing side effects like this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.