Skip to content

Commit

Permalink
Ensure setting mode as a string works too
Browse files Browse the repository at this point in the history
  • Loading branch information
brynary committed Jan 18, 2009
1 parent 00d0d7b commit 743d787
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/webrat/core/configuration.rb
Expand Up @@ -70,12 +70,12 @@ def open_error_files? #:nodoc:
# Allows setting of webrat's mode, valid modes are:
# :rails, :selenium, :rack, :sinatra, :mechanize, :merb
def mode=(mode)
@mode = mode
@mode = mode.to_sym

# This is a temporary hack to support backwards compatibility
# with Merb 1.0.8 until it's updated to use the new Webrat.configure
# syntax
if @mode.to_s == "merb"
if @mode == :merb
require("webrat/merb_session")
else
require("webrat/#{mode}")
Expand Down

0 comments on commit 743d787

Please sign in to comment.