Configuring host and port for Selenium/Capybara

I’m using Capybara and Selenium together with RSpec to test the Web Interface for VersionEye. That works very well. For an integration test I needed a callback on localhost:3000/auth/*. By Default Capybara is starting the tests on an odd host and port name to avoid conflicts with locahost:3000, which is the default host and portContinue reading “Configuring host and port for Selenium/Capybara”

Testing AJAX with Capybara and Selenium

In the past days I migrated my tests from WebRat to Capybara and I wrote a couple new acceptance tests with RSpec, Capybara and the selenium-webdriver. All in one it’s pretty cool. You can just keep writing your acceptance tests as usual with RSpec and Capybara. Here is a small example. This test is sendingContinue reading “Testing AJAX with Capybara and Selenium”

Moving Tests from Webrat to Capybara

I one of my applications I had a bunch of tests written with RSpec and Webrat. Unfortunately it seems that Webrat is not longer maintained actively anymore. That’s why it is a good decision to move to Capybara, an active Test Framework for Ruby. The Migration was so far pretty smooth. Most time it wasContinue reading “Moving Tests from Webrat to Capybara”

Testing SSL with Capybara and Selenium

I am using Capybara with Selenium as JS engine to write acceptance tests for a Ruby on Rails application. In some controllers I am forcing SSL with the “force_ssl” filter from Rails. By running the tests with Selenium this caused some problems. Selenium is launching Firefox and calls the URL Of course there isContinue reading “Testing SSL with Capybara and Selenium”

undefined method `visit’ for RSpec with Capybara

I just started to write an acceptance test with capybara. I followed the code example on the GitHub Page and I got this odd error: Failure/Error: visit ‘; NoMethodError: undefined method `visit’ for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0x007fda48e0f680> I placed my test in “spec/requests”. After some research I found out that the new Capybara GEM expects the test to beContinue reading “undefined method `visit’ for RSpec with Capybara”