Permalink
Browse files

Final notes.

  • Loading branch information...
1 parent 41dd4ea commit e29bdb1a06e742351c144a870ca017fcb7b17d5d @metaskills committed May 14, 2011
Showing with 9 additions and 9 deletions.
  1. +1 −3 test/integration/holygrail_test.rb
  2. +8 −6 test/test_helper_integration.rb
@@ -8,11 +8,9 @@ class HolygrailTest < ActionController::IntegrationTest
assert page.has_selector?('h1#demoIndex'), 'should load the h1 normally'
find('h1#demoIndex').click
assert !page.has_selector?('h1#demoIndex'), 'should remove h1 after clicking it'
-
- # raise goto_index_demos_url.inspect
-
# Redirect to index
visit goto_index_demos_path
+ assert page.has_selector?('h1#demoIndex')
assert_equal demos_url, page.current_url
end
@@ -6,35 +6,37 @@
module ActionController
+ # If you want to be persnikity about host/port matching backend webkit_server.
module Integration
class Session
-
DEFAULT_HOST = '127.0.0.1'
-
def host
DEFAULT_HOST
end
-
def reset_with_capybara_webkit!
reset_without_capybara_webkit!
self.host = DEFAULT_HOST
end
alias_method_chain :reset!, :capybara_webkit
-
def url_for_with_capybara_webkit(options)
options[:host] = host
options[:port] = Capybara.server_port
url_for_without_capybara_webkit(options)
end
alias_method_chain :url_for, :capybara_webkit
-
end
end
class IntegrationTest
include Capybara::DSL
end
-
+end
+
+# If you want to use transitional fixtures and force all threads to 1 DB connection.
+class ActiveRecord::Base
+ def self.connection
+ @@shared_connection ||= retrieve_connection
+ end
end

0 comments on commit e29bdb1

Please sign in to comment.