diff --git a/.gitignore b/.gitignore index 035e578..d7dc521 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ log db/schema.rb db/*.sqlite3 - +tmp diff --git a/config/environment.rb b/config/environment.rb index 8c9ed72..3b73caf 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -54,7 +54,7 @@ # If you change this key, all old sessions will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. - config.action_controller.session_store = :mem_cache_store + #config.action_controller.session_store = :mem_cache_store config.action_controller.session = { :session_key => '_twitloc_session', :expires => 4 * 3600, @@ -74,4 +74,8 @@ # Activate observers that should always be running # Please note that observers generated using script/generate observer need to have an _observer suffix # config.active_record.observers = :cacher, :garbage_collector, :forum_observer +# config.gem "atmos-webrat", :lib => "webrat", :source => "http://gems.github.com" + config.gem "ubermajestix-twitter", :lib => "twitter", :source => "http://gems.github.com" + config.gem "rspec", :lib => "spec" + end diff --git a/test/integration/visiting_twitplot_test.rb b/test/integration/visiting_twitplot_test.rb index cf7bb17..1b4bd53 100644 --- a/test/integration/visiting_twitplot_test.rb +++ b/test/integration/visiting_twitplot_test.rb @@ -2,7 +2,7 @@ class VisitingTwitplotTest < ActionController::IntegrationTest # Replace this with your real tests. - test "the truth" do + test "visiting / and clicking search" do visit '/' assert_have_selector 'div#about' assert_have_selector 'div#results' diff --git a/test/test_helper.rb b/test/test_helper.rb index 04bfcf8..822f643 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,8 +1,7 @@ ENV["RAILS_ENV"] = "test" require File.expand_path(File.dirname(__FILE__) + "/../config/environment") require 'test_help' -require 'webrat' -require 'webrat/selenium' +require 'spec' class Test::Unit::TestCase self.use_transactional_fixtures = true @@ -16,27 +15,13 @@ class Test::Unit::TestCase # Add more helper methods to be used by all tests here... end -if ENV['SELENIUM'] - module ActionController #:nodoc: - IntegrationTest.class_eval do - include Webrat::Selenium::Methods - include Webrat::Selenium::Matchers - end - end -end -Webrat.configure do |config| - if ENV['SELENIUM'] - module ActionController #:nodoc: - IntegrationTest.class_eval do - include Webrat::Selenium::Methods - include Webrat::Selenium::Matchers - end - end - config.mode = :selenium - else - config.mode = :rails - end +if ENV['SELENIUM'] + require 'webrat/selenium' + Webrat.configuration.application_port = 4567 + Webrat.configuration.application_environment = 'test' + Webrat.configuration.mode = :selenium +else + require 'webrat/rails' + Webrat.configuration.mode = :rails end - -