Configuring cucumber for Selenium with Rails 3 - RSpec book example?

84 views
Skip to first unread message

Kristian

unread,
Jun 9, 2010, 6:41:57 AM6/9/10
to Cukes
My cucumber generated env.rb looks a lot different than the Rails 2
equivalent!
I use Capybara with RSpec 2 and cucumber 0.8

In my env.rb I have no block or open class.
Do I need to set the host? Do I need to set some kind of Capybara mode
to selenium somehow?
Maybe culerity or sth instead?
---

Page 339 of RSpec book (b13)

# support/env.rb

Webrat.configure do |config|
config.mode = :selenium # was rails
config.open_error_files = false
end

ActionController::Base.allow_rescue = false

Cucumber::Rails::World.use_transactional_fixtures = false

require 'database_cleaner'
DatabaseCleaner.strategy = :truncation

class ActiveSupport::TestCase
setup do |session|
session.host! "localhost:3001"
end
end
---

David Chelimsky

unread,
Jun 9, 2010, 8:35:26 AM6/9/10
to cu...@googlegroups.com

Page 11 of the RSpec book (b13) says this:

For installation instructions for all the library code you need, please see http://wiki.github.com/dchelimsky/rspec/code-for-the-rspec-book-beta.

I've just updated http://wiki.github.com/dchelimsky/rspec/code-for-the-rspec-book-beta with beta 13 info:

• rspec-1.3.0
• rspec-rails-1.3.2
• cucumber-0.3.11
• webrat-0.6.0
• rails-2.3.5
• Selenium-1.1.14
• selenium-client-1.2.16

The book will be updated for Rails-3, RSpec-2 and Cucumber-0.8, but it's going to be a bit because there are still moving targets.

If there's something that is not working for you when you follow instructions in the rspec and cucumber docs for the newer versions you're trying to use, by all means, please ask for help, but please do not expect the book to tell you what you need for these newer versions until it is actually updated for them.

WIth that - what problem are you experiencing?

Cheers,
David

Reply all
Reply to author
Forward
0 new messages