I want to write a spec for omniauth with vcr like this.
describe "Omniauth" do
describe "Twitter" do
VCR.use_cassette 'omniauth/twitter' do
auth = visit 'users/auth/twitter'
auth.info.name.should exist
end
end
end
This cause error undefined method 'visit', and I found it is very tricky to use capybara and vcr at the same.
So I'm going to write visit function without capybara.
But I don't know how to write it. Could anyone help me?
Edit 2014/01/19
This question is voted closed because my question was not clear, so I add more details.
vcr uses rack server and so is capybara, therefore normally I can't use Capybara's visit method inside of VCR.use_cassette method.
I want to know equivalent of visit method that is using only pure rspec method.