Permalink
Browse files

remove backup, preserve playground

  • Loading branch information...
1 parent 9a97aea commit 30455166436874a00ed26f77cf5da0e21f79fe4d Sven Fuchs committed Feb 20, 2010
Showing with 19 additions and 14,878 deletions.
  1. +0 −28 _backup/app/contollers/test/sessions_controller.rb
  2. +0 −5 _backup/config/routes.rb
  3. +0 −62 _backup/lib/steam/rails/reloader.rb
  4. +0 −30 _backup/lib/steam/rails/test_case.rb
  5. +0 −3 _backup/test/all.rb
  6. +0 −5 _backup/test/features/steam.feature
  7. +0 −8 _backup/test/features/step_definitions/steam_steps.rb
  8. +0 −133 _backup/test/features/step_definitions/webrat_steps.rb
  9. +0 −30 _backup/test/features/support/env.rb
  10. 0 _backup/test/features/support/hooks.rb
  11. +0 −15 _backup/test/features/support/paths.rb
  12. +0 −17 _backup/test/features/support/responses.rb
  13. +0 −327 _backup/test/fixtures/page.html
  14. BIN _backup/test/fixtures/rails.png
  15. +0 −10 _backup/test/fixtures/rails/Rakefile
  16. +0 −2 _backup/test/fixtures/rails/app/controllers/application_controller.rb
  17. +0 −18 _backup/test/fixtures/rails/app/controllers/users_controller.rb
  18. +0 −3 _backup/test/fixtures/rails/app/models/user.rb
  19. +0 −25 _backup/test/fixtures/rails/app/views/layouts/application.html.erb
  20. +0 −6 _backup/test/fixtures/rails/app/views/users/index.html.erb
  21. +0 −2 _backup/test/fixtures/rails/app/views/users/show.html.erb
  22. +0 −110 _backup/test/fixtures/rails/config/boot.rb
  23. +0 −22 _backup/test/fixtures/rails/config/database.yml
  24. +0 −41 _backup/test/fixtures/rails/config/environment.rb
  25. +0 −17 _backup/test/fixtures/rails/config/environments/development.rb
  26. +0 −28 _backup/test/fixtures/rails/config/environments/production.rb
  27. +0 −28 _backup/test/fixtures/rails/config/environments/test.rb
  28. +0 −7 _backup/test/fixtures/rails/config/initializers/backtrace_silencers.rb
  29. +0 −10 _backup/test/fixtures/rails/config/initializers/inflections.rb
  30. +0 −5 _backup/test/fixtures/rails/config/initializers/mime_types.rb
  31. +0 −21 _backup/test/fixtures/rails/config/initializers/new_rails_defaults.rb
  32. +0 −15 _backup/test/fixtures/rails/config/initializers/session_store.rb
  33. +0 −5 _backup/test/fixtures/rails/config/locales/en.yml
  34. +0 −3 _backup/test/fixtures/rails/config/routes.rb
  35. BIN _backup/test/fixtures/rails/db/development.sqlite3
  36. +0 −12 _backup/test/fixtures/rails/db/migrate/20090926101010_create_users.rb
  37. +0 −20 _backup/test/fixtures/rails/db/schema.rb
  38. BIN _backup/test/fixtures/rails/db/test.sqlite3
  39. BIN _backup/test/fixtures/rails/public/images/rails.png
  40. +0 −8 _backup/test/fixtures/rails/public/javascripts/ajax_call.js
  41. +0 −3 _backup/test/fixtures/rails/public/javascripts/application.js
  42. +0 −9,137 _backup/test/fixtures/rails/public/javascripts/jquery-ui.js
  43. +0 −4,376 _backup/test/fixtures/rails/public/javascripts/jquery.js
  44. +0 −3 _backup/test/fixtures/rails/public/stylesheets/application.css
  45. +0 −32 _backup/test/playground/drb/daemonized_client.rb
  46. +0 −56 _backup/test/playground/drb/daemons.rb
  47. +0 −22 _backup/test/playground/drb/forker.rb
  48. +0 −10 _backup/test/playground/drb/server.rb
  49. +0 −154 _backup/test/test_helper.rb
  50. +16 −0 lib/steam/browser.rb
  51. 0 {_backup → }/test/playground/connection.rb
  52. +3 −4 test/playground/drb.rb
  53. 0 {_backup → }/test/playground/java_signature.rb
  54. 0 {_backup → }/test/playground/nokogiri.rb
  55. 0 {_backup → }/test/playground/put_headers.rb
  56. 0 {_backup → }/test/playground/rack.rb
  57. 0 {_backup → }/test/playground/rjb_bind.rb
  58. 0 {_backup → }/test/playground/stack_level_problem.rb
  59. 0 {_backup → }/test/playground/thread_problem.rb
  60. 0 {_backup → }/test/playground/web_response_data.rb
  61. 0 {_backup → }/test/playground/webrat.rb
  62. 0 {_backup → }/test/playground/xhr_accept_headers.rb
@@ -1,28 +0,0 @@
-class Test::SessionsController < ApplicationController
- def index
- render :text => 'sessions'
- end
-
- def create
- reset_database!
- render :text => '123455', :status => 201 # TODO how to return the session id?
- end
-
- def destroy
- render :text => 'OK'
- end
-
- def reset_database!
- # request.env['rack.test.db_reset'] = 'dump' # TODO move to client
-
- case request.env['rack.test.db_reset']
- when 'dump'
- `mysql -u root env_test < #{Rails.root}/db/dumps/env_test.dump.sql`
- else
- ActiveRecord::Migration.suppress_messages do
- load("#{Rails.root}/db/schema.rb")
- end
- load("#{Rails.root}/test/fixtures.rb")
- end
- end
-end
View
@@ -1,5 +0,0 @@
-ActionController::Routing::Routes.draw do |map|
- map.namespace :test do |test|
- test.resources :sessions
- end
-end
@@ -1,62 +0,0 @@
-require 'thread'
-
-module Steam
- module Rails
- class Reloader
- @@lock = Mutex.new
- cattr_accessor :default_lock
-
- class BodyWrapper
- def initialize(body, lock, cleanup)
- @body = body
- @lock = lock
- @cleanup = cleanup
- end
-
- def close
- @body.close if @body.respond_to?(:close)
- ensure
- Dispatcher.cleanup_application if @cleanup
- @lock.unlock
- end
-
- def method_missing(*args, &block)
- @body.send(*args, &block)
- end
-
- def respond_to?(symbol, include_private = false)
- symbol == :close || @body.respond_to?(symbol, include_private)
- end
- end
-
- def initialize(app)
- @app = app
- end
-
- def call(env)
- rewrite_test_env!(env)
-
- begin
- @@lock.lock
- Dispatcher.reload_application unless env.has_key?('rack.test.cache_classes')
- # gotta call build_middleware_stack if reloading
- status, headers, body = @app.call(env)
- [status, headers, BodyWrapper.new(body, @@lock, !env.has_key?('rack.test.cache_classes'))]
- rescue Exception
- @@lock.unlock
- raise
- end
- end
-
- protected
-
- def rewrite_test_env!(env)
- env.keys.each do |key|
- if key.include?('HTTP_RACK.TEST')
- env[key.downcase.sub(/^http_/, '')] = env.delete(key)
- end
- end
- end
- end
- end
-end
@@ -1,30 +0,0 @@
-# require 'active_support/test_case'
-# require 'steam/session'
-#
-# module Steam
-# module Rails
-# class TestCase < ActiveSupport::TestCase
-# attr_reader :session
-# delegate :browser, :request, :response, :headers, :session, :get, :post, :put, :delete, :head, :to => :@session
-# delegate :status, :to => :response
-#
-# setup do |test|
-# test.init
-# end
-#
-# teardown do |test|
-# test.reset!
-# end
-#
-# def init
-# browser = Steam::Browser::HtmlUnit.new
-# @session = Steam::Session.new(browser)
-# end
-#
-# def reset!
-# @session.stop
-# @session = nil
-# end
-# end
-# end
-# end
View
@@ -1,3 +0,0 @@
-Dir[File.dirname(__FILE__) + '/**/*_test.rb'].each do |filename|
- require filename
-end
@@ -1,5 +0,0 @@
-Feature: Steam
- Scenario: Cucumber integration
- When I go to the users index page
- Then I should see a list of users
- And jquery should have set the document title to "FOO"
@@ -1,8 +0,0 @@
-Then /^I should see a list of users$/ do
- # FIXME! implement webrat matchers
- response.body.join.should match(/id="users"/)
-end
-
-Then /^jquery should have set the document title to "([^\"]*)"$/ do |value|
- response.body.join.should match(/<title>\s*#{value}\s*<\/title>/)
-end
@@ -1,133 +0,0 @@
-require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
-
-# Commonly used webrat steps
-# http://github.com/brynary/webrat
-
-Given /^I am on (.+)$/ do |page_name|
- visit path_to(page_name)
-end
-
-When /^I go to (.+)$/ do |page_name|
- visit path_to(page_name)
-end
-
-When /^I press "([^\"]*)"$/ do |button|
- click_button(button)
-end
-
-When /^I follow "([^\"]*)"$/ do |link|
- click_link(link)
-end
-
-When /^I follow "([^\"]*)" within "([^\"]*)"$/ do |link, parent|
- click_link_within(parent, link)
-end
-
-When /^I fill in "([^\"]*)" with "([^\"]*)"$/ do |field, value|
- fill_in(field, :with => value)
-end
-
-When /^I select "([^\"]*)" from "([^\"]*)"$/ do |value, field|
- select(value, :from => field)
-end
-
-# Use this step in conjunction with Rail's datetime_select helper. For example:
-# When I select "December 25, 2008 10:00" as the date and time
-When /^I select "([^\"]*)" as the date and time$/ do |time|
- select_datetime(time)
-end
-
-# Use this step when using multiple datetime_select helpers on a page or
-# you want to specify which datetime to select. Given the following view:
-# <%= f.label :preferred %><br />
-# <%= f.datetime_select :preferred %>
-# <%= f.label :alternative %><br />
-# <%= f.datetime_select :alternative %>
-# The following steps would fill out the form:
-# When I select "November 23, 2004 11:20" as the "Preferred" date and time
-# And I select "November 25, 2004 10:30" as the "Alternative" date and time
-When /^I select "([^\"]*)" as the "([^\"]*)" date and time$/ do |datetime, datetime_label|
- select_datetime(datetime, :from => datetime_label)
-end
-
-# Use this step in conjunction with Rail's time_select helper. For example:
-# When I select "2:20PM" as the time
-# Note: Rail's default time helper provides 24-hour time-- not 12 hour time. Webrat
-# will convert the 2:20PM to 14:20 and then select it.
-When /^I select "([^\"]*)" as the time$/ do |time|
- select_time(time)
-end
-
-# Use this step when using multiple time_select helpers on a page or you want to
-# specify the name of the time on the form. For example:
-# When I select "7:30AM" as the "Gym" time
-When /^I select "([^\"]*)" as the "([^\"]*)" time$/ do |time, time_label|
- select_time(time, :from => time_label)
-end
-
-# Use this step in conjunction with Rail's date_select helper. For example:
-# When I select "February 20, 1981" as the date
-When /^I select "([^\"]*)" as the date$/ do |date|
- select_date(date)
-end
-
-# Use this step when using multiple date_select helpers on one page or
-# you want to specify the name of the date on the form. For example:
-# When I select "April 26, 1982" as the "Date of Birth" date
-When /^I select "([^\"]*)" as the "([^\"]*)" date$/ do |date, date_label|
- select_date(date, :from => date_label)
-end
-
-When /^I check "([^\"]*)"$/ do |field|
- check(field)
-end
-
-When /^I uncheck "([^\"]*)"$/ do |field|
- uncheck(field)
-end
-
-When /^I choose "([^\"]*)"$/ do |field|
- choose(field)
-end
-
-When /^I attach the file at "([^\"]*)" to "([^\"]*)"$/ do |path, field|
- attach_file(field, path)
-end
-
-Then /^I should see "([^\"]*)"$/ do |text|
- response.should contain(text)
-end
-
-Then /^I should see \/([^\/]*)\/$/ do |regexp|
- regexp = Regexp.new(regexp)
- response.should contain(regexp)
-end
-
-Then /^I should not see "([^\"]*)"$/ do |text|
- response.should_not contain(text)
-end
-
-Then /^I should not see \/([^\/]*)\/$/ do |regexp|
- regexp = Regexp.new(regexp)
- response.should_not contain(regexp)
-end
-
-Then /^the "([^\"]*)" field should contain "([^\"]*)"$/ do |field, value|
- field_labeled(field).value.should =~ /#{value}/
-end
-
-Then /^the "([^\"]*)" field should not contain "([^\"]*)"$/ do |field, value|
- field_labeled(field).value.should_not =~ /#{value}/
-end
-
-Then /^the "([^\"]*)" checkbox should be checked$/ do |label|
- field_labeled(label).should be_checked
-end
-
-Then /^the "([^\"]*)" checkbox should not be checked$/ do |label|
- field_labeled(label).should_not be_checked
-end
-
-Then /^I should be on (.+)$/ do |page_name|
- URI.parse(page.url).path.should == path_to(page_name)
-end
@@ -1,30 +0,0 @@
-ENV["RAILS_ENV"] ||= "test"
-
-$: << File.expand_path(File.dirname(__FILE__) + "/../../../lib")
-
-require 'rubygems'
-require 'cucumber/formatter/unicode'
-require 'spork'
-require 'steam'
-
-Spork.prefork do
- require File.expand_path(File.dirname(__FILE__) + '/../../fixtures/rails/config/environment.rb')
- ActiveRecord::Base.establish_connection(:test)
-
- root = File.expand_path(RAILS_ROOT + '/public')
- static = Steam::Connection::Static.new(:root => root)
- rails = Steam::Connection::Rails.new
-
- connection = Rack::Cascade.new([static, rails])
- Steam::Browser::HtmlUnit::Drb::Service.daemonize(connection)
- sleep(0.25)
-
- World do
- browser = Steam::Browser::HtmlUnit.new(:drb => true)
- Steam::Session::Rails.new(browser)
- end
-end
-
-Spork.each_run do
-end
-
No changes.
@@ -1,15 +0,0 @@
-module NavigationHelpers
- def path_to(page_name)
- case page_name
- when /the home page/
- '/'
- when /the users index page/
- users_path
- else
- raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
- "Now, go and add a mapping in #{__FILE__}"
- end
- end
-end
-
-World(NavigationHelpers)
@@ -1,17 +0,0 @@
-# module MockResponsesHelper
-# def mock
-# p 'mock!'
-# end
-# end
-#
-# World(MockResponsesHelper)
-#
-# # Before do
-# # p self
-# # end
-#
-# # mock.get '...', 'body'
-#
-# AfterConfiguration do |config|
-# p config
-# end
Oops, something went wrong.

0 comments on commit 3045516

Please sign in to comment.