Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

deleting final svn methods

  • Loading branch information...
commit b5e4da7269801960e95c60b3aa6e3b95d4f3dd77 1 parent e8fcb4c
@vanntastic vanntastic authored
Showing with 0 additions and 1,422 deletions.
  1. +0 −55 lib/generators/controller/.svn/entries
  2. +0 −1  lib/generators/controller/.svn/format
  3. +0 −29 lib/generators/controller/.svn/text-base/USAGE.svn-base
  4. +0 −37 lib/generators/controller/.svn/text-base/controller_generator.rb.svn-base
  5. +0 −76 lib/generators/controller/templates/.svn/entries
  6. +0 −1  lib/generators/controller/templates/.svn/format
  7. +0 −10 lib/generators/controller/templates/.svn/text-base/controller.rb.svn-base
  8. +0 −8 lib/generators/controller/templates/.svn/text-base/functional_test.rb.svn-base
  9. +0 −2  lib/generators/controller/templates/.svn/text-base/helper.rb.svn-base
  10. +0 −2  lib/generators/controller/templates/.svn/text-base/view.html.erb.svn-base
  11. +0 −55 lib/generators/model/.svn/entries
  12. +0 −1  lib/generators/model/.svn/format
  13. +0 −27 lib/generators/model/.svn/text-base/USAGE.svn-base
  14. +0 −45 lib/generators/model/.svn/text-base/model_generator.rb.svn-base
  15. +0 −76 lib/generators/model/templates/.svn/entries
  16. +0 −1  lib/generators/model/templates/.svn/format
  17. +0 −19 lib/generators/model/templates/.svn/text-base/fixtures.yml.svn-base
  18. +0 −16 lib/generators/model/templates/.svn/text-base/migration.rb.svn-base
  19. +0 −2  lib/generators/model/templates/.svn/text-base/model.rb.svn-base
  20. +0 −8 lib/generators/model/templates/.svn/text-base/unit_test.rb.svn-base
  21. +0 −43 lib/test/spec/.svn/entries
  22. +0 −1  lib/test/spec/.svn/format
  23. +0 −28 lib/test/spec/.svn/text-base/rails.rb.svn-base
  24. +0 −208 lib/test/spec/rails/.svn/entries
  25. +0 −1  lib/test/spec/rails/.svn/format
  26. +0 −21 lib/test/spec/rails/.svn/text-base/dummy_response.rb.svn-base
  27. +0 −33 lib/test/spec/rails/.svn/text-base/should_redirect.rb.svn-base
  28. +0 −22 lib/test/spec/rails/.svn/text-base/should_render.rb.svn-base
  29. +0 −34 lib/test/spec/rails/.svn/text-base/should_route.rb.svn-base
  30. +0 −52 lib/test/spec/rails/.svn/text-base/should_select.rb.svn-base
  31. +0 −16 lib/test/spec/rails/.svn/text-base/should_validate.rb.svn-base
  32. +0 −27 lib/test/spec/rails/.svn/text-base/should_validate_presence_of.rb.svn-base
  33. +0 −38 lib/test/spec/rails/.svn/text-base/test_dummy.rb.svn-base
  34. +0 −15 lib/test/spec/rails/.svn/text-base/test_layout.rb.svn-base
  35. +0 −40 lib/test/spec/rails/.svn/text-base/test_spec_ext.rb.svn-base
  36. +0 −15 lib/test/spec/rails/.svn/text-base/test_status.rb.svn-base
  37. +0 −14 lib/test/spec/rails/.svn/text-base/test_template.rb.svn-base
  38. +0 −33 lib/test/spec/rails/.svn/text-base/test_unit_ext.rb.svn-base
  39. +0 −25 lib/test/spec/rails/.svn/text-base/test_url.rb.svn-base
  40. +0 −51 lib/test/spec/rails/.svn/text-base/use_controller.rb.svn-base
  41. +0 −40 tasks/.svn/entries
  42. +0 −1  tasks/.svn/format
  43. +0 −15 tasks/.svn/text-base/spec.rake.svn-base
  44. +0 −43 test/.svn/entries
  45. +0 −1  test/.svn/format
  46. +0 −7 test/.svn/text-base/test_helper.rb.svn-base
  47. +0 −31 test/test/.svn/entries
  48. +0 −1  test/test/.svn/format
  49. +0 −31 test/test/spec/.svn/entries
  50. +0 −1  test/test/spec/.svn/format
  51. +0 −40 test/test/spec/rails/.svn/entries
  52. +0 −1  test/test/spec/rails/.svn/format
  53. +0 −22 test/test/spec/rails/.svn/text-base/test_status_test.rb.svn-base
View
55 lib/generators/controller/.svn/entries
@@ -1,55 +0,0 @@
-8
-
-dir
-3350
-svn://internal.innerfusion.us/gameday_undies/trunk/gameday_undies/vendor/plugins/test_spec_on_rails/lib/generators/controller
-svn://internal.innerfusion.us
-
-
-
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-d9c37a22-14b1-0441-8096-eb603b6dc06e
-
-USAGE
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-334eb6dcaa907a9902e134f5f2bd9679
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-controller_generator.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-dc6d5969d1797ba6f2cb4758948a84de
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-templates
-dir
-
View
1  lib/generators/controller/.svn/format
@@ -1 +0,0 @@
-8
View
29 lib/generators/controller/.svn/text-base/USAGE.svn-base
@@ -1,29 +0,0 @@
-Description:
- Stubs out a new controller and its views. Pass the controller name, either
- CamelCased or under_scored, and a list of views as arguments.
-
- To create a controller within a module, specify the controller name as a
- path like 'parent_module/controller_name'.
-
- This generates a controller class in app/controllers, view templates in
- app/views/controller_name, a helper class in app/helpers, and a functional
- test suite in test/functional.
-
-Example:
- `./script/generate controller CreditCard open debit credit close`
-
- Credit card controller with URLs like /credit_card/debit.
- Controller: app/controllers/credit_card_controller.rb
- Views: app/views/credit_card/debit.html.erb [...]
- Helper: app/helpers/credit_card_helper.rb
- Test: test/functional/credit_card_controller_test.rb
-
-Modules Example:
- `./script/generate controller 'admin/credit_card' suspend late_fee`
-
- Credit card admin controller with URLs /admin/credit_card/suspend.
- Controller: app/controllers/admin/credit_card_controller.rb
- Views: app/views/admin/credit_card/debit.html.erb [...]
- Helper: app/helpers/admin/credit_card_helper.rb
- Test: test/functional/admin/credit_card_controller_test.rb
-
View
37 lib/generators/controller/.svn/text-base/controller_generator.rb.svn-base
@@ -1,37 +0,0 @@
-class ControllerGenerator < Rails::Generator::NamedBase
- def manifest
- record do |m|
- # Check for class naming collisions.
- m.class_collisions class_path, "#{class_name}Controller", "#{class_name}ControllerTest", "#{class_name}Helper"
-
- # Controller, helper, views, and test directories.
- m.directory File.join('app/controllers', class_path)
- m.directory File.join('app/helpers', class_path)
- m.directory File.join('app/views', class_path, file_name)
- m.directory File.join('test/functional', class_path)
-
- # Controller class, functional test, and helper class.
- m.template 'controller.rb',
- File.join('app/controllers',
- class_path,
- "#{file_name}_controller.rb")
-
- m.template 'functional_test.rb',
- File.join('test/functional',
- class_path,
- "#{file_name}_controller_test.rb")
-
- m.template 'helper.rb',
- File.join('app/helpers',
- class_path,
- "#{file_name}_helper.rb")
-
- # View template for each action.
- actions.each do |action|
- path = File.join('app/views', class_path, file_name, "#{action}.html.erb")
- m.template 'view.html.erb', path,
- :assigns => { :action => action, :path => path }
- end
- end
- end
-end
View
76 lib/generators/controller/templates/.svn/entries
@@ -1,76 +0,0 @@
-8
-
-dir
-3350
-svn://internal.innerfusion.us/gameday_undies/trunk/gameday_undies/vendor/plugins/test_spec_on_rails/lib/generators/controller/templates
-svn://internal.innerfusion.us
-
-
-
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-d9c37a22-14b1-0441-8096-eb603b6dc06e
-
-helper.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-e8491aac2379dbba3d3ddadc30f6db07
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-functional_test.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-fa9bd8d807ac8a12173b93a28cfa71a3
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-view.html.erb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-9174fe893f23101aa086395a0f0436ff
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-controller.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-f856baaf1a7ed492e286d32a12ac8a42
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
View
1  lib/generators/controller/templates/.svn/format
@@ -1 +0,0 @@
-8
View
10 lib/generators/controller/templates/.svn/text-base/controller.rb.svn-base
@@ -1,10 +0,0 @@
-class <%= class_name %>Controller < ApplicationController
-<% if options[:scaffold] -%>
- scaffold :<%= singular_name %>
-<% end -%>
-<% for action in actions -%>
-
- def <%= action %>
- end
-<% end -%>
-end
View
8 lib/generators/controller/templates/.svn/text-base/functional_test.rb.svn-base
@@ -1,8 +0,0 @@
-require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper'
-
-describe "<%= class_name %>Controller", ActionController::TestCase do
- # Replace this with your real tests.
- it "should be true" do
- assert true
- end
-end
View
2  lib/generators/controller/templates/.svn/text-base/helper.rb.svn-base
@@ -1,2 +0,0 @@
-module <%= class_name %>Helper
-end
View
2  lib/generators/controller/templates/.svn/text-base/view.html.erb.svn-base
@@ -1,2 +0,0 @@
-<h1><%= class_name %>#<%= action %></h1>
-<p>Find me in <%= path %></p>
View
55 lib/generators/model/.svn/entries
@@ -1,55 +0,0 @@
-8
-
-dir
-3350
-svn://internal.innerfusion.us/gameday_undies/trunk/gameday_undies/vendor/plugins/test_spec_on_rails/lib/generators/model
-svn://internal.innerfusion.us
-
-
-
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-d9c37a22-14b1-0441-8096-eb603b6dc06e
-
-USAGE
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-3bc7b2ad4300620a30fa7a1706050c2d
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-model_generator.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-f8664613e6fd42ea9973009887898655
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-templates
-dir
-
View
1  lib/generators/model/.svn/format
@@ -1 +0,0 @@
-8
View
27 lib/generators/model/.svn/text-base/USAGE.svn-base
@@ -1,27 +0,0 @@
-Description:
- Stubs out a new model. Pass the model name, either CamelCased or
- under_scored, and an optional list of attribute pairs as arguments.
-
- Attribute pairs are column_name:sql_type arguments specifying the
- model's attributes. Timestamps are added by default, so you don't have to
- specify them by hand as 'created_at:datetime updated_at:datetime'.
-
- You don't have to think up every attribute up front, but it helps to
- sketch out a few so you can start working with the model immediately.
-
- This generates a model class in app/models, a unit test in test/unit,
- a test fixture in test/fixtures/singular_name.yml, and a migration in
- db/migrate.
-
-Examples:
- `./script/generate model account`
-
- creates an Account model, test, fixture, and migration:
- Model: app/models/account.rb
- Test: test/unit/account_test.rb
- Fixtures: test/fixtures/accounts.yml
- Migration: db/migrate/XXX_add_accounts.rb
-
- `./script/generate model post title:string body:text published:boolean`
-
- creates a Post model with a string title, text body, and published flag.
View
45 lib/generators/model/.svn/text-base/model_generator.rb.svn-base
@@ -1,45 +0,0 @@
-class ModelGenerator < Rails::Generator::NamedBase
- default_options :skip_timestamps => false, :skip_migration => false, :skip_fixture => false
-
- def manifest
- record do |m|
- # Check for class naming collisions.
- m.class_collisions class_path, class_name, "#{class_name}Test"
-
- # Model, test, and fixture directories.
- m.directory File.join('app/models', class_path)
- m.directory File.join('test/unit', class_path)
- m.directory File.join('test/fixtures', class_path)
-
- # Model class, unit test, and fixtures.
- m.template 'model.rb', File.join('app/models', class_path, "#{file_name}.rb")
- m.template 'unit_test.rb', File.join('test/unit', class_path, "#{file_name}_test.rb")
-
- unless options[:skip_fixture]
- m.template 'fixtures.yml', File.join('test/fixtures', "#{table_name}.yml")
- end
-
- unless options[:skip_migration]
- m.migration_template 'migration.rb', 'db/migrate', :assigns => {
- :migration_name => "Create#{class_name.pluralize.gsub(/::/, '')}"
- }, :migration_file_name => "create_#{file_path.gsub(/\//, '_').pluralize}"
- end
- end
- end
-
- protected
- def banner
- "Usage: #{$0} #{spec.name} ModelName [field:type, field:type]"
- end
-
- def add_options!(opt)
- opt.separator ''
- opt.separator 'Options:'
- opt.on("--skip-timestamps",
- "Don't add timestamps to the migration file for this model") { |v| options[:skip_timestamps] = v }
- opt.on("--skip-migration",
- "Don't generate a migration file for this model") { |v| options[:skip_migration] = v }
- opt.on("--skip-fixture",
- "Don't generation a fixture file for this model") { |v| options[:skip_fixture] = v}
- end
-end
View
76 lib/generators/model/templates/.svn/entries
@@ -1,76 +0,0 @@
-8
-
-dir
-3350
-svn://internal.innerfusion.us/gameday_undies/trunk/gameday_undies/vendor/plugins/test_spec_on_rails/lib/generators/model/templates
-svn://internal.innerfusion.us
-
-
-
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-d9c37a22-14b1-0441-8096-eb603b6dc06e
-
-unit_test.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-df38be9db754248f2e46025d73cef790
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-model.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-7f054b7a56a8c8014b8604d7fa2a5acc
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-fixtures.yml
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-ea688b19c2daf32ba2c86e7a8130ec8f
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-migration.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-fc57b400f3cb775b733bb5470264b7a2
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
View
1  lib/generators/model/templates/.svn/format
@@ -1 +0,0 @@
-8
View
19 lib/generators/model/templates/.svn/text-base/fixtures.yml.svn-base
@@ -1,19 +0,0 @@
-# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
-
-<% unless attributes.empty? -%>
-one:
-<% for attribute in attributes -%>
- <%= attribute.name %>: <%= attribute.default %>
-<% end -%>
-
-two:
-<% for attribute in attributes -%>
- <%= attribute.name %>: <%= attribute.default %>
-<% end -%>
-<% else -%>
-# one:
-# column: value
-#
-# two:
-# column: value
-<% end -%>
View
16 lib/generators/model/templates/.svn/text-base/migration.rb.svn-base
@@ -1,16 +0,0 @@
-class <%= migration_name %> < ActiveRecord::Migration
- def self.up
- create_table :<%= table_name %> do |t|
-<% for attribute in attributes -%>
- t.<%= attribute.type %> :<%= attribute.name %>
-<% end -%>
-<% unless options[:skip_timestamps] %>
- t.timestamps
-<% end -%>
- end
- end
-
- def self.down
- drop_table :<%= table_name %>
- end
-end
View
2  lib/generators/model/templates/.svn/text-base/model.rb.svn-base
@@ -1,2 +0,0 @@
-class <%= class_name %> < ActiveRecord::Base
-end
View
8 lib/generators/model/templates/.svn/text-base/unit_test.rb.svn-base
@@ -1,8 +0,0 @@
-require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper'
-
-describe "<%= class_name %>", ActiveSupport::TestCase do
- # Replace this with your real tests.
- it "should be true" do
- assert true
- end
-end
View
43 lib/test/spec/.svn/entries
@@ -1,43 +0,0 @@
-8
-
-dir
-3350
-svn://internal.innerfusion.us/gameday_undies/trunk/gameday_undies/vendor/plugins/test_spec_on_rails/lib/test/spec
-svn://internal.innerfusion.us
-
-
-
-2008-10-24T17:06:12.795353Z
-3350
-vanne
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-d9c37a22-14b1-0441-8096-eb603b6dc06e
-
-rails
-dir
-
-rails.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-4ab02ac16cf2a657397ca27a0b5c5926
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
View
1  lib/test/spec/.svn/format
@@ -1 +0,0 @@
-8
View
28 lib/test/spec/.svn/text-base/rails.rb.svn-base
@@ -1,28 +0,0 @@
-require 'test/spec'
-
-module Test::Spec::Rails
- VERSION = "0.1"
-end
-
-%w(
- test_spec_ext
- test_unit_ext
-
- test_dummy
- dummy_response
- test_status
- test_template
- test_layout
-
- should_redirect
- should_render
- should_route
- should_select
- should_validate
- should_validate_presence_of
-
- use_controller
-
-).each do |file|
- require "test/spec/rails/#{file}"
-end
View
208 lib/test/spec/rails/.svn/entries
@@ -1,208 +0,0 @@
-8
-
-dir
-3350
-svn://internal.innerfusion.us/gameday_undies/trunk/gameday_undies/vendor/plugins/test_spec_on_rails/lib/test/spec/rails
-svn://internal.innerfusion.us
-
-
-
-2008-10-24T17:06:12.795353Z
-3350
-vanne
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-d9c37a22-14b1-0441-8096-eb603b6dc06e
-
-should_validate_presence_of.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-0ee7c1c72177ea64a4abfae22e7cb41a
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-should_redirect.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-29e8dcd0a83089d554020fb4b1911acb
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-test_status.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-a157042291bc5d2fa5229bf2c42e2754
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-test_dummy.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-006c230a1b274a42a0afd43eeff8bd97
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-should_select.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-07c9296a51dc0215d304476a2d87693c
-2008-10-24T17:06:12.795353Z
-3350
-vanne
-
-should_render.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-5c5dfbb3d58b5dac9da030c213ed99cf
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-test_unit_ext.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-b4880990578f0d89a1047e6b37c2032e
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-use_controller.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-d5501afe150f905bef586aa6a2b36a0e
-2008-10-13T23:56:31.931267Z
-3294
-vanne
-
-test_url.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-b56e1047ae56d109d8b9b2e5f5d01dbc
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-should_validate.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-d26581b6cfa05f2b5b4f3f2875c498b0
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-test_spec_ext.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-699d5c0f1407175072e5ae656f12c7d4
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-dummy_response.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-6207d6d766082fefc73f2c958cb60421
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-test_template.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-bea23b101482e6b2bbd1a6bad15f7dd7
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-test_layout.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-b358c07120d71abb3225eb4b04ae020b
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-should_route.rb
-file
-
-
-
-
-2008-10-24T16:58:42.000000Z
-e9042c89a47b8452dca3ec4c343abadf
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
View
1  lib/test/spec/rails/.svn/format
@@ -1 +0,0 @@
-8
View
21 lib/test/spec/rails/.svn/text-base/dummy_response.rb.svn-base
@@ -1,21 +0,0 @@
-module Test::Spec::Rails
- class DummyResponse < TestDummy
-
- attr_reader :body, :headers, :content_type
-
- def initialize(body, headers=nil)
- if headers.nil?
- response = body.instance_variable_get('@response')
- @body, @headers = response.body, response.headers
- else
- @body, @headers = body, headers
- end
- @response = self
- end
-
- def html_document
- @html_document ||= HTML::Document.new(@body)
- end
-
- end
-end
View
33 lib/test/spec/rails/.svn/text-base/should_redirect.rb.svn-base
@@ -1,33 +0,0 @@
-module Test::Spec::Rails::ShouldRedirect
- # Test that we were redirected somewhere:
- # request.should.redirect
- #
- # Test that we were redirected to a specific url:
- # request.should.redirect :controller => 'foo', :action => 'bar'
- # or:
- # request.should.be.redirected foo_url(@foo)
- #
- def redirect(options = {})
- if options.empty?
- @object.assert_response :redirect
- else
- @object.assert_redirected_to options
- end
- end
- alias :redirect_to :redirect
- alias :redirected :redirect
- alias :redirected_to :redirect
-end
-
-module Test::Spec::Rails::ShouldNotRedirect
- # Test that we weren't redirected
- def redirect(options = {})
- @object.assert_response :success # TODO: fix me
- end
- alias :redirect_to :redirect
- alias :redirected :redirect
- alias :redirected_to :redirect
-end
-
-Test::Spec::Should.send(:include, Test::Spec::Rails::ShouldRedirect)
-Test::Spec::ShouldNot.send(:include, Test::Spec::Rails::ShouldNotRedirect)
View
22 lib/test/spec/rails/.svn/text-base/should_render.rb.svn-base
@@ -1,22 +0,0 @@
-module Test::Spec::Rails::ShouldRender
- # Test that something was rendered:
- # request.should.render
- #
- # Test that a specific template was rendered:
- # request.should.render 'foo'
- #
- def render(template = '')
- @object.assert_response :success
- @object.assert_template template unless template.blank?
- end
-end
-
-module Test::Spec::Rails::ShouldNotRender
- # Test that we didn't render
- def redirect(template = '')
- @object.assert_response :redirect # TODO: fix me
- end
-end
-
-Test::Spec::Should.send(:include, Test::Spec::Rails::ShouldRender)
-Test::Spec::ShouldNot.send(:include, Test::Spec::Rails::ShouldNotRender)
View
34 lib/test/spec/rails/.svn/text-base/should_route.rb.svn-base
@@ -1,34 +0,0 @@
-module Test::Spec::Rails::ShouldRoute
- # Specify that a set of url options route to a path.
- # This translates directly to assert_generates
- # Example:
- # {:controller => "items", :action => "show", :id =>"1"}.should.route_to "/items/1"
- #
- # See also http://api.rubyonrails.org/classes/ActionController/Assertions/RoutingAssertions.html#M000367
- def route_to(options)
- assert_generates(options, @object)
- end
-
- # Specify that a path should be routable from a set of url options.
- # This translates directly to assert_recognizes
- # Examples:
- # {:path => "/items/1", :method => :get}.should.route_from :controller => "items", :action => "show", :id =>"1"
- # {:path => "/items/1?print=true", :method => :get}.should.route_from({:controller => "items", :action => "show", :id =>"1"}, {:print => true})
- #
- # See also http://api.rubyonrails.org/classes/ActionController/Assertions/RoutingAssertions.html#M000366
- def route_from(options, extras={})
- assert_recognizes(options, @object, extras)
- end
-
- # Specify that a path should be routable from a set of url options and vice versa.
- # This translates directly to assert_routing
- # Examples:
- # "/items/1".should.route :controller => "items", :action => "show", :id =>"1"
- #
- # See also http://api.rubyonrails.org/classes/ActionController/Assertions/RoutingAssertions.html#M000368
- def route(options)
- assert_routing(@object, options)
- end
-end
-
-Test::Spec::Should.send(:include, Test::Spec::Rails::ShouldRoute)
View
52 lib/test/spec/rails/.svn/text-base/should_select.rb.svn-base
@@ -1,52 +0,0 @@
-module Test::Spec::Rails::ShouldSelect
- # Wrapper for +assert_select+. Examples:
- #
- # Test that the previous request has a login form:
- # page.should.select "form#login"
- #
- # Test that a specific form has a field pre-filled (this is specific test/spec/rails):
- # page.should.select "form#login" do |form|
- # form.should.select "input[name=user_nick]", :text => @user.nick
- # end
- #
- # OR you can use contain
- # page.should.contain "form#login"
- #
- # page.should.contain "form#login" do |form|
- # form.should.contain "input[name=user_nick]", :text => @user.nick
- # end
- #
- # See the Rails API documentation for assert_select for more information
- def select(selector, equality=true, message=nil, &block)
- @@response_stack ||= []
-
- if @object.is_a?(Test::Unit::TestCase)
- @@response_stack.push(Test::Spec::Rails::DummyResponse.new(@object))
-
- elsif @object.is_a?(Array) && @object.first.is_a?(HTML::Tag)
- @@response_stack.push(Test::Spec::Rails::DummyResponse.new(
- @object.first.to_s, @@response_stack.last.headers
- ))
- else
- @@response_stack.push(Test::Spec::Rails::DummyResponse.new(@object.to_s,
- (@@response_stack.last.headers rescue 'Content-Type: text/html; charset=utf8')
- ))
- end
-
- @@response_stack.last.assert_select(selector, equality, message, &block)
- @@response_stack.pop
- end
-
- # because contain sounds better imo
- alias :contain :select
-end
-
-module Test::Spec::Rails::ShouldNotSelect
- include Test::Spec::Rails::ShouldSelect
- def select(selector, message=nil, &block)
- super(selector, false, message, &block)
- end
-end
-
-Test::Spec::Should.send(:include, Test::Spec::Rails::ShouldSelect)
-Test::Spec::ShouldNot.send(:include, Test::Spec::Rails::ShouldNotSelect)
View
16 lib/test/spec/rails/.svn/text-base/should_validate.rb.svn-base
@@ -1,16 +0,0 @@
-module Test::Spec::Rails::ShouldValidate
- def validate
- assert_valid @object
- end
- alias :validated :validate
-end
-
-module Test::Spec::Rails::ShouldNotValidate
- def validate
- assert !@object.valid?
- end
- alias :validated :validate
-end
-
-Test::Spec::Should.send(:include, Test::Spec::Rails::ShouldValidate)
-Test::Spec::ShouldNot.send(:include, Test::Spec::Rails::ShouldNotValidate)
View
27 lib/test/spec/rails/.svn/text-base/should_validate_presence_of.rb.svn-base
@@ -1,27 +0,0 @@
-module Test::Spec::Rails::ShouldValidatePresenceOf
- def it_should_validate_presence_of(*one_or_more_fields)
- model_name = self.model_class_under_test
- options = one_or_more_fields.last.is_a?(Hash) ? one_or_more_fields.pop : {}
-
- one_or_more_fields.each do |field|
- it "should validate presence of #{field.to_s.humanize.downcase}" do
- validations = model_name.reflect_on_all_validations
- validations = validations.select { |e| e.macro == :validates_presence_of }
- validations = validations.inject({}) { |h,v| h[v.name] = v; h }
-
- validation = validations[field]
- assert_not_nil validation, "Expected validates_presence_of to be called on :#{field}, but it wasn't"
- options.each_pair do |k,v|
- assert_equal v, validation.options[k],
- "Expected validates_presence_of to set :#{k} => :#{v} as an option, but it didn't"
- end
- end
- end
- end
-
- def model_class_under_test
- name.constantize
- end
-end
-
-Test::Unit::TestCase.send(:extend, Test::Spec::Rails::ShouldValidatePresenceOf)
View
38 lib/test/spec/rails/.svn/text-base/test_dummy.rb.svn-base
@@ -1,38 +0,0 @@
-# Base class for testcase/response/request/controller mocks
-class Test::Spec::Rails::TestDummy
- include Test::Unit::Assertions
- include ActionController::Assertions
-
- def initialize(testcase)
- @controller = testcase.instance_variable_get('@controller')
- @request = testcase.instance_variable_get('@request')
- @response = testcase.instance_variable_get('@response')
- end
-
- def inspect
- "<#{self.class}:#{self.to_s}>"
- end
-
- def method_missing(method, *args, &block)
- if real_response.respond_to?(method)
- real_response.send(method, *args, &block)
- elsif real_request.respond_to?(method)
- real_request.send(method, *args, &block)
- elsif real_controller.respond_to?(method)
- real_controller.send(method, *args, &block)
- else
- super
- end
- end
-
- def real_response
- @response unless @response == self
- end
- def real_request
- @request unless @request == self
- end
- def real_controller
- @controller unless @controller == self
- end
-
-end
View
15 lib/test/spec/rails/.svn/text-base/test_layout.rb.svn-base
@@ -1,15 +0,0 @@
-module Test::Spec::Rails
- class TestLayout < TestDummy
-
- def should_equal(expected, message=nil)
- layout = @response.layout.gsub(/layouts\//, '') if @response.layout
- assert_equal expected, layout, message
- end
- alias :should_be :should_equal
-
- def to_s
- @response.rendered_file
- end
-
- end
-end
View
40 lib/test/spec/rails/.svn/text-base/test_spec_ext.rb.svn-base
@@ -1,40 +0,0 @@
-class Test::Spec::Should
- include ActionController::Assertions
-
- alias :_old_equal :equal
- def equal(*args)
- @object.respond_to?(:should_equal) ? @object.should_equal(*args) : _old_equal(*args)
- end
-
- alias :_old_be :be
- def be(*args)
- @object.respond_to?(:should_equal) ? @object.should_equal(*args) : _old_be(*args)
- end
-
- alias :have :be
-
- def differ(method)
- @initial_value = @object.send(@method = method)
- self
- end
-
- def by(value)
- yield
- # TODO: this should use should_equal if available
- assert_equal @initial_value + value, @object.send(@method)
- end
-end
-
-class Test::Spec::ShouldNot
- include ActionController::Assertions
-
- alias :_old_equal :equal
- def equal(*args,&block)
- @object.respond_to?(:should_not_equal) ? @object.should_not_equal(*args,&block) : _old_equal(*args,&block)
- end
-
- alias :_old_be :be
- def be(*args,&block)
- @object.respond_to?(:should_not_equal) ? @object.should_not_equal(*args,&block) : _old_be(*args,&block)
- end
-end
View
15 lib/test/spec/rails/.svn/text-base/test_status.rb.svn-base
@@ -1,15 +0,0 @@
-module Test::Spec::Rails
- class TestStatus < TestDummy
-
- def should_equal(status, message=nil)
- assert_response status, message
- end
- alias :should_be :should_equal
-
- def to_s
- @response.response_code.to_s
- end
-
- end
-end
-
View
14 lib/test/spec/rails/.svn/text-base/test_template.rb.svn-base
@@ -1,14 +0,0 @@
-module Test::Spec::Rails
- class TestTemplate < TestDummy
-
- def should_equal(template, message=nil)
- assert_template template, message
- end
- alias :should_be :should_equal
-
- def to_s
- @response.rendered_file
- end
-
- end
-end
View
33 lib/test/spec/rails/.svn/text-base/test_unit_ext.rb.svn-base
@@ -1,33 +0,0 @@
-class Test::Unit::TestCase
- def page #:nodoc:
- self
- end
- alias :response :page
- alias :request :page
- alias :view :page
-
- def output
- @response.body
- end
- alias :to_s :output
- alias :body :output
- alias :html :output
- alias :xhtml :output
-
- def url
- Test::Spec::Rails::TestUrl.new(self)
- end
-
- def status
- Test::Spec::Rails::TestStatus.new(self)
- end
-
- def template
- Test::Spec::Rails::TestTemplate.new(self)
- end
-
- def layout
- Test::Spec::Rails::TestLayout.new(self)
- end
-
-end
View
25 lib/test/spec/rails/.svn/text-base/test_url.rb.svn-base
@@ -1,25 +0,0 @@
-module Test::Spec::Rails
- class TestUrl < TestDummy
-
- def initialize(testcase)
- super(testcase)
- @params = @request.symbolized_path_parameters
- @path = @request.path
- end
-
- def should_equal(wanted, defaults={}, extras={}, message=nil)
- if wanted.is_a?(Hash)
- assert_recognizes(wanted, @path, defaults, message)
- else
- assert_generates(wanted, @params, defaults, extras, message)
- end
- end
- alias :should_be :should_equal
-
- def to_s
- @path
- end
-
- end
-end
-
View
51 lib/test/spec/rails/.svn/text-base/use_controller.rb.svn-base
@@ -1,51 +0,0 @@
-module Test::Spec::Rails::UseController
- module InstanceMethod
- # Setup controller for tests.
- # For example:
- # context "Tuxie" do
- # setup do
- # use_controller UsersController
- # login_as users(:tuxie)
- # end
- # specify "should be able to see his profile" { ... }
- # end
-
- # OR
- # to save some keystrokes you can use a symbolized version of the controller name
- # without the 'Controller' suffix
- # For example:
- # context "Tuxie" do
- # setup do
- # use_controller :users
- # login_as :tuxie
- # end
- # specify "should be able to see his profile" { ... }
- # end
-
- def use_controller(controller)
- controller = eval("#{controller.to_s.camelize}Controller") if controller.is_a? Symbol
- controller.class_eval { def rescue_action(e); raise e; end }
- @controller = controller.new
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- end
- end
-
- module ClassMethod
- # Setup context for controller testing. For example:
- # context "If not logged in" do
- # use_controller SessionsController
- # specify "one should see the login box" do
- # get :new
- # page.should.select "form#login"
- # end
- # end
- def use_controller(controller)
- setups << lambda { use_controller(controller) }
- end
- end
-end
-
-
-Test::Spec::TestCase::ClassMethods.send(:include, Test::Spec::Rails::UseController::ClassMethod)
-Test::Unit::TestCase.send(:include, Test::Spec::Rails::UseController::InstanceMethod)
View
40 tasks/.svn/entries
@@ -1,40 +0,0 @@
-8
-
-dir
-3350
-svn://internal.innerfusion.us/gameday_undies/trunk/gameday_undies/vendor/plugins/test_spec_on_rails/tasks
-svn://internal.innerfusion.us
-
-
-
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-d9c37a22-14b1-0441-8096-eb603b6dc06e
-
-spec.rake
-file
-
-
-
-
-2008-10-24T16:58:41.000000Z
-619273d3c1e6bff6565d1ac7d1d9445d
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
View
1  tasks/.svn/format
@@ -1 +0,0 @@
-8
View
15 tasks/.svn/text-base/spec.rake.svn-base
@@ -1,15 +0,0 @@
-desc "Show specs when testing"
-task :spec do
- ENV['TESTOPTS'] = '--runner=s'
- Rake::Task[:test].invoke
-end
-
-%w(functionals units integration).each do |type|
- namespace :spec do
- desc "Show specs when testing #{type}"
- task type do
- ENV['TESTOPTS'] = '--runner=s'
- Rake::Task["test:#{type}"].invoke
- end
- end
-end
View
43 test/.svn/entries
@@ -1,43 +0,0 @@
-8
-
-dir
-3350
-svn://internal.innerfusion.us/gameday_undies/trunk/gameday_undies/vendor/plugins/test_spec_on_rails/test
-svn://internal.innerfusion.us
-
-
-
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-d9c37a22-14b1-0441-8096-eb603b6dc06e
-
-test
-dir
-
-test_helper.rb
-file
-
-
-
-
-2008-10-24T16:58:38.000000Z
-b93b240663dae0d93dd5b9f1e1cf4792
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
View
1  test/.svn/format
@@ -1 +0,0 @@
-8
View
7 test/.svn/text-base/test_helper.rb.svn-base
@@ -1,7 +0,0 @@
-require 'rubygems'
-require 'action_controller'
-require 'action_controller/assertions'
-
-$LOAD_PATH << File.dirname(__FILE__) + '/../lib'
-require 'test/spec/rails'
-require 'mocha'
View
31 test/test/.svn/entries
@@ -1,31 +0,0 @@
-8
-
-dir
-3350
-svn://internal.innerfusion.us/gameday_undies/trunk/gameday_undies/vendor/plugins/test_spec_on_rails/test/test
-svn://internal.innerfusion.us
-
-
-
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-d9c37a22-14b1-0441-8096-eb603b6dc06e
-
-spec
-dir
-
View
1  test/test/.svn/format
@@ -1 +0,0 @@
-8
View
31 test/test/spec/.svn/entries
@@ -1,31 +0,0 @@
-8
-
-dir
-3350
-svn://internal.innerfusion.us/gameday_undies/trunk/gameday_undies/vendor/plugins/test_spec_on_rails/test/test/spec
-svn://internal.innerfusion.us
-
-
-
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-d9c37a22-14b1-0441-8096-eb603b6dc06e
-
-rails
-dir
-
View
1  test/test/spec/.svn/format
@@ -1 +0,0 @@
-8
View
40 test/test/spec/rails/.svn/entries
@@ -1,40 +0,0 @@
-8
-
-dir
-3350
-svn://internal.innerfusion.us/gameday_undies/trunk/gameday_undies/vendor/plugins/test_spec_on_rails/test/test/spec/rails
-svn://internal.innerfusion.us
-
-
-
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-d9c37a22-14b1-0441-8096-eb603b6dc06e
-
-test_status_test.rb
-file
-
-
-
-
-2008-10-24T16:58:38.000000Z
-5e74caa4510529f4805d509664b9d429
-2008-10-13T22:46:52.221139Z
-3293
-vanne
-
View
1  test/test/spec/rails/.svn/format
@@ -1 +0,0 @@
-8
View
22 test/test/spec/rails/.svn/text-base/test_status_test.rb.svn-base
@@ -1,22 +0,0 @@
-require File.dirname(__FILE__) + '/../../../test_helper'
-
-describe "TestStatus" do
- it "should call assert_response" do
- status = Test::Spec::Rails::TestStatus.new(stub_everything)
- status.expects(:assert_response).with(:success, nil)
- status.should_equal :success
- end
-
- it "should call assert_response with message" do
- status = Test::Spec::Rails::TestStatus.new(stub_everything)
- status.expects(:assert_response).with(:success, "Response should be successful")
- status.should_equal :success, "Response should be successful"
- end
-
- it "should return response code" do
- status = Test::Spec::Rails::TestStatus.new(stub_everything)
- status.class.class_eval { attr_accessor :response }
- status.response.expects(:response_code).returns("200")
- status.to_s.should == "200"
- end
-end
Please sign in to comment.
Something went wrong with that request. Please try again.