0.02
No commit activity in last 3 years
No release in over 3 years
Adds the rake task to launch capybara console for your Rails project.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 3.0
 Project Readme

CapybaraConsole

This tiny gem provides you with a Capybara console for your Rails project. Simply include it in your Gemfile:

gem 'capybara-console'

then run

rake capybara:console

and you're completely set to go REPLing with Capybara, like

> visit 'http://github.com'

or

> visit '/'

If you need something included in your console by default, create a capybara:prepare_console task:

namespace :capybara do

  task :prepare_console do

    def test_path opts 
      path = opts[:path] || '/'
      subdomain = opts[:subdomain] || 'test'
      port = Capybara.current_session.server.port
      url = "http://#{subdomain}.mytestdomain.home:#{port}#{path}"
    end

  end

end

Enjoy!

Licensed under MIT-LICENSE.