Skip to content

Commit

Permalink
Adding require and switching to class_eval
Browse files Browse the repository at this point in the history
  • Loading branch information
brynary committed Nov 28, 2008
1 parent 97bb64f commit ff2dd5d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/webrat/rails.rb
@@ -1,4 +1,5 @@
require "webrat"
require "action_controller/integration"

module Webrat
class RailsSession < Session #:nodoc:
Expand Down Expand Up @@ -71,15 +72,15 @@ def response #:nodoc:

module ActionController #:nodoc:
module Integration #:nodoc:
class Session #:nodoc:
Session.class_eval do
unless instance_methods.include?("put_via_redirect")
require "webrat/rails/redirect_actions"
include Webrat::RedirectActions
end
end
end

class IntegrationTest
IntegrationTest.class_eval do
include Webrat::Methods
end
end
Expand Down

0 comments on commit ff2dd5d

Please sign in to comment.