Permalink
Browse files

Made tests work from inside the plugin

  • Loading branch information...
1 parent a9b778d commit 1c237e450feb7ceb64f0a9c54e5116bb530c876c hurrycane committed Aug 25, 2010
Showing with 38,138 additions and 37 deletions.
  1. +8 −0 Gemfile
  2. +94 −1 Gemfile.lock
  3. +20 −13 Rakefile
  4. +19 −0 spec/dummy/Gemfile
  5. +109 −0 spec/dummy/Gemfile.lock
  6. +7 −0 spec/dummy/Rakefile
  7. +3 −0 spec/dummy/app/controllers/application_controller.rb
  8. +257 −0 spec/dummy/app/controllers/rails_admin_controller.rb
  9. +2 −0 spec/dummy/app/helpers/application_helper.rb
  10. +324 −0 spec/dummy/app/helpers/rails_admin_helper.rb
  11. +7 −0 spec/dummy/app/models/division.rb
  12. +11 −0 spec/dummy/app/models/draft.rb
  13. +6 −0 spec/dummy/app/models/league.rb
  14. +8 −0 spec/dummy/app/models/player.rb
  15. +13 −0 spec/dummy/app/models/team.rb
  16. +10 −0 spec/dummy/app/views/layouts/_flash.html.erb
  17. +14 −0 spec/dummy/app/views/layouts/application.html.erb
  18. +46 −0 spec/dummy/app/views/layouts/dashboard.html.erb
  19. +49 −0 spec/dummy/app/views/layouts/delete.html.erb
  20. +84 −0 spec/dummy/app/views/layouts/form.html.erb
  21. +50 −0 spec/dummy/app/views/layouts/list.html.erb
  22. +27 −0 spec/dummy/app/views/rails_admin/_belongs_to_association.html.erb
  23. +14 −0 spec/dummy/app/views/rails_admin/_big_decimal.html.erb
  24. +7 −0 spec/dummy/app/views/rails_admin/_boolean.html.erb
  25. +10 −0 spec/dummy/app/views/rails_admin/_date.html.erb
  26. +10 −0 spec/dummy/app/views/rails_admin/_datetime.html.erb
  27. +10 −0 spec/dummy/app/views/rails_admin/_float.html.erb
  28. +65 −0 spec/dummy/app/views/rails_admin/_has_many_association.html.erb
  29. +27 −0 spec/dummy/app/views/rails_admin/_has_one_association.html.erb
  30. +10 −0 spec/dummy/app/views/rails_admin/_integer.html.erb
  31. +16 −0 spec/dummy/app/views/rails_admin/_navigation.html.erb
  32. +23 −0 spec/dummy/app/views/rails_admin/_properties.html.erb
  33. +9 −0 spec/dummy/app/views/rails_admin/_string.html.erb
  34. +8 −0 spec/dummy/app/views/rails_admin/_text.html.erb
  35. +10 −0 spec/dummy/app/views/rails_admin/_time.html.erb
  36. +10 −0 spec/dummy/app/views/rails_admin/_timestamp.html.erb
  37. +41 −0 spec/dummy/app/views/rails_admin/delete.html.erb
  38. +31 −0 spec/dummy/app/views/rails_admin/edit.html.erb
  39. +76 −0 spec/dummy/app/views/rails_admin/index.html.erb
  40. +90 −0 spec/dummy/app/views/rails_admin/list.html.erb
  41. +34 −0 spec/dummy/app/views/rails_admin/new.html.erb
  42. +4 −0 spec/dummy/config.ru
  43. +43 −0 spec/dummy/config/application.rb
  44. +13 −0 spec/dummy/config/boot.rb
  45. +22 −0 spec/dummy/config/database.yml
  46. +5 −0 spec/dummy/config/environment.rb
  47. +26 −0 spec/dummy/config/environments/development.rb
  48. +49 −0 spec/dummy/config/environments/production.rb
  49. +35 −0 spec/dummy/config/environments/test.rb
  50. +7 −0 spec/dummy/config/initializers/backtrace_silencers.rb
  51. +10 −0 spec/dummy/config/initializers/inflections.rb
  52. +5 −0 spec/dummy/config/initializers/mime_types.rb
  53. +7 −0 spec/dummy/config/initializers/secret_token.rb
  54. +8 −0 spec/dummy/config/initializers/session_store.rb
  55. +5 −0 spec/dummy/config/locales/en.yml
  56. +10 −0 spec/dummy/config/routes.rb
  57. BIN spec/dummy/db/development.sqlite3
  58. +13 −0 spec/dummy/db/migrate/001_create_divisions_migration.rb
  59. +19 −0 spec/dummy/db/migrate/002_create_drafts_migration.rb
  60. +12 −0 spec/dummy/db/migrate/003_create_leagues_migration.rb
  61. +20 −0 spec/dummy/db/migrate/004_create_players_migration.rb
  62. +22 −0 spec/dummy/db/migrate/005_create_teams_migration.rb
  63. +71 −0 spec/dummy/db/schema.rb
  64. +7 −0 spec/dummy/db/seeds.rb
  65. BIN spec/dummy/db/test.sqlite3
  66. +60 −0 spec/dummy/lib/rails_admin/abstract_model.rb
  67. +144 −0 spec/dummy/lib/rails_admin/active_record_support.rb
  68. +13 −0 spec/dummy/lib/rails_admin/generic_support.rb
  69. 0 spec/dummy/lib/tasks/.gitkeep
  70. +56 −0 spec/dummy/log/development.log
  71. +23,491 −0 spec/dummy/log/test.log
  72. +26 −0 spec/dummy/public/404.html
  73. +26 −0 spec/dummy/public/422.html
  74. +26 −0 spec/dummy/public/500.html
  75. 0 spec/dummy/public/favicon.ico
  76. BIN spec/dummy/public/images/add_new.png
  77. BIN spec/dummy/public/images/arrow_left.png
  78. BIN spec/dummy/public/images/arrow_right.png
  79. BIN spec/dummy/public/images/background.png
  80. BIN spec/dummy/public/images/bullet_arrow_down.png
  81. BIN spec/dummy/public/images/bullet_arrow_down_smaller.png
  82. BIN spec/dummy/public/images/bullet_arrow_up.png
  83. BIN spec/dummy/public/images/bullet_arrow_up_smaller.png
  84. BIN spec/dummy/public/images/bullet_black.png
  85. BIN spec/dummy/public/images/bullet_white.png
  86. BIN spec/dummy/public/images/calendar.png
  87. BIN spec/dummy/public/images/cancel.png
  88. BIN spec/dummy/public/images/clock.png
  89. BIN spec/dummy/public/images/cross.png
  90. BIN spec/dummy/public/images/delete_confirmation.png
  91. BIN spec/dummy/public/images/error.png
  92. BIN spec/dummy/public/images/fast_btn.png
  93. BIN spec/dummy/public/images/handler.png
  94. BIN spec/dummy/public/images/magnifier.png
  95. BIN spec/dummy/public/images/navigation_more.png
  96. BIN spec/dummy/public/images/rails.png
  97. BIN spec/dummy/public/images/save.png
  98. BIN spec/dummy/public/images/saveandadd.png
  99. BIN spec/dummy/public/images/saveandedit.png
  100. BIN spec/dummy/public/images/search.png
  101. BIN spec/dummy/public/images/selector-add.gif
  102. BIN spec/dummy/public/images/selector-addall.gif
  103. BIN spec/dummy/public/images/selector-remove.gif
  104. BIN spec/dummy/public/images/selector-removeall.gif
  105. BIN spec/dummy/public/images/undo.png
  106. +239 −0 spec/dummy/public/index.html
  107. +2 −0 spec/dummy/public/javascripts/application.js
  108. +182 −0 spec/dummy/public/javascripts/associations.js
  109. +965 −0 spec/dummy/public/javascripts/controls.js
  110. +911 −0 spec/dummy/public/javascripts/datepicker.js
  111. +974 −0 spec/dummy/public/javascripts/dragdrop.js
  112. +1,123 −0 spec/dummy/public/javascripts/effects.js
  113. +22 −0 spec/dummy/public/javascripts/prototype-base-extensions.js
  114. +230 −0 spec/dummy/public/javascripts/prototype-date-extensions.js
  115. +6,001 −0 spec/dummy/public/javascripts/prototype.js
  116. +175 −0 spec/dummy/public/javascripts/rails.js
  117. +5 −0 spec/dummy/public/robots.txt
  118. 0 spec/dummy/public/stylesheets/.gitkeep
  119. +295 −0 spec/dummy/public/stylesheets/base.css
  120. +365 −0 spec/dummy/public/stylesheets/create.css
  121. +220 −0 spec/dummy/public/stylesheets/dashboard.css
  122. +108 −0 spec/dummy/public/stylesheets/datepicker.css
  123. +67 −0 spec/dummy/public/stylesheets/delete.css
  124. +301 −0 spec/dummy/public/stylesheets/list.css
  125. +6 −0 spec/dummy/script/rails
  126. +23 −23 spec/spec_helper.rb
View
@@ -1,4 +1,12 @@
source 'http://rubygems.org'
+gem 'rails', '3.0.0.rc2'
+gem 'sqlite3-ruby', :require => 'sqlite3'
+gem 'builder'
+
gem 'jeweler'
gem 'devise'
+
+gem "launchy", ">= 0.3.0"
+gem "rspec-rails", ">= 2.0.0.beta.20"
+gem "webrat", :git => "git://github.com/kalv/webrat.git"
View
@@ -1,26 +1,119 @@
+GIT
+ remote: git://github.com/kalv/webrat.git
+ revision: 66130e4
+ specs:
+ webrat (0.7.2.pre)
+ nokogiri (>= 1.2.0)
+ rack (>= 1.0)
+ rack-test (>= 0.5.3)
+
GEM
remote: http://rubygems.org/
specs:
+ abstract (1.0.0)
+ actionmailer (3.0.0.rc2)
+ actionpack (= 3.0.0.rc2)
+ mail (~> 2.2.5)
+ actionpack (3.0.0.rc2)
+ activemodel (= 3.0.0.rc2)
+ activesupport (= 3.0.0.rc2)
+ builder (~> 2.1.2)
+ erubis (~> 2.6.6)
+ i18n (~> 0.4.1)
+ rack (~> 1.2.1)
+ rack-mount (~> 0.6.12)
+ rack-test (~> 0.5.4)
+ tzinfo (~> 0.3.23)
+ activemodel (3.0.0.rc2)
+ activesupport (= 3.0.0.rc2)
+ builder (~> 2.1.2)
+ i18n (~> 0.4.1)
+ activerecord (3.0.0.rc2)
+ activemodel (= 3.0.0.rc2)
+ activesupport (= 3.0.0.rc2)
+ arel (~> 1.0.0.rc1)
+ tzinfo (~> 0.3.23)
+ activeresource (3.0.0.rc2)
+ activemodel (= 3.0.0.rc2)
+ activesupport (= 3.0.0.rc2)
+ activesupport (3.0.0.rc2)
+ arel (1.0.0.rc1)
+ activesupport (>= 3.0.0.beta)
bcrypt-ruby (2.1.2)
- devise (1.1.1)
+ builder (2.1.2)
+ configuration (1.1.0)
+ devise (1.1.2)
bcrypt-ruby (~> 2.1.2)
warden (~> 0.10.7)
+ diff-lcs (1.1.2)
+ erubis (2.6.6)
+ abstract (>= 1.0.0)
gemcutter (0.6.1)
git (1.2.5)
+ i18n (0.4.1)
jeweler (1.4.0)
gemcutter (>= 0.1.0)
git (>= 1.2.5)
rubyforge (>= 2.0.0)
json_pure (1.4.6)
+ launchy (0.3.7)
+ configuration (>= 0.0.5)
+ rake (>= 0.8.1)
+ mail (2.2.5)
+ activesupport (>= 2.3.6)
+ mime-types
+ treetop (>= 1.4.5)
+ mime-types (1.16)
+ nokogiri (1.4.3.1)
+ polyglot (0.3.1)
rack (1.2.1)
+ rack-mount (0.6.12)
+ rack (>= 1.0.0)
+ rack-test (0.5.4)
+ rack (>= 1.0)
+ rails (3.0.0.rc2)
+ actionmailer (= 3.0.0.rc2)
+ actionpack (= 3.0.0.rc2)
+ activerecord (= 3.0.0.rc2)
+ activeresource (= 3.0.0.rc2)
+ activesupport (= 3.0.0.rc2)
+ bundler (>= 1.0.0.rc.6)
+ railties (= 3.0.0.rc2)
+ railties (3.0.0.rc2)
+ actionpack (= 3.0.0.rc2)
+ activesupport (= 3.0.0.rc2)
+ rake (>= 0.8.3)
+ thor (~> 0.14.0)
+ rake (0.8.7)
+ rspec (2.0.0.beta.20)
+ rspec-core (= 2.0.0.beta.20)
+ rspec-expectations (= 2.0.0.beta.20)
+ rspec-mocks (= 2.0.0.beta.20)
+ rspec-core (2.0.0.beta.20)
+ rspec-expectations (2.0.0.beta.20)
+ diff-lcs (>= 1.1.2)
+ rspec-mocks (2.0.0.beta.20)
+ rspec-rails (2.0.0.beta.20)
+ rspec (= 2.0.0.beta.20)
rubyforge (2.0.4)
json_pure (>= 1.1.7)
+ sqlite3-ruby (1.3.1)
+ thor (0.14.0)
+ treetop (1.4.8)
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.23)
warden (0.10.7)
rack (>= 1.0.0)
PLATFORMS
ruby
DEPENDENCIES
+ builder
devise
jeweler
+ launchy (>= 0.3.0)
+ rails (= 3.0.0.rc2)
+ rspec-rails (>= 2.0.0.beta.20)
+ sqlite3-ruby
+ webrat!
View
@@ -1,13 +1,20 @@
-begin
- require "jeweler"
- Jeweler::Tasks.new do |gem|
- gem.name = "rails_admin"
- gem.summary = "RailsAdmin for Rails 3"
- gem.files = Dir["{lib}/**/*", "{app}/**/*", "{config}/**/*"]
- # other fields that would normally go in your gemspec
- # like authors, email and has_rdoc can also be included here
-
- end
-rescue
- puts "Jeweler or one of its dependencies is not installed."
-end
+require 'rake'
+require 'rake/rdoctask'
+require 'rake/gempackagetask'
+
+require 'rspec/core'
+require 'rspec/core/rake_task'
+
+
+require "jeweler"
+Jeweler::Tasks.new do |gem|
+ gem.name = "rails_admin"
+ gem.summary = "RailsAdmin for Rails 3"
+ gem.files = Dir["{lib}/**/*", "{app}/**/*", "{config}/**/*"]
+ # other fields that would normally go in your gemspec
+ # like authors, email and has_rdoc can also be included here
+end
+
+Rspec::Core::RakeTask.new(:spec)
+
+task :default => :spec
View
@@ -0,0 +1,19 @@
+source 'http://rubygems.org'
+
+gem 'rails', '3.0.0.rc2'
+gem 'sqlite3-ruby', :require => 'sqlite3'
+gem 'builder'
+
+# To use debugger
+# gem 'ruby-debug'
+
+gem 'devise'
+
+# Bundle gems for the local environment. Make sure to
+# put test-only gems in this group so their generators
+# and rake tasks are available in development mode:
+group :development, :test do
+ gem "launchy", ">= 0.3.0"
+ gem "rspec-rails", ">= 2.0.0.beta.20"
+ gem "webrat", :git => "git://github.com/kalv/webrat.git"
+end
View
@@ -0,0 +1,109 @@
+GIT
+ remote: git://github.com/kalv/webrat.git
+ revision: 66130e4
+ specs:
+ webrat (0.7.2.pre)
+ nokogiri (>= 1.2.0)
+ rack (>= 1.0)
+ rack-test (>= 0.5.3)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ abstract (1.0.0)
+ actionmailer (3.0.0.rc2)
+ actionpack (= 3.0.0.rc2)
+ mail (~> 2.2.5)
+ actionpack (3.0.0.rc2)
+ activemodel (= 3.0.0.rc2)
+ activesupport (= 3.0.0.rc2)
+ builder (~> 2.1.2)
+ erubis (~> 2.6.6)
+ i18n (~> 0.4.1)
+ rack (~> 1.2.1)
+ rack-mount (~> 0.6.12)
+ rack-test (~> 0.5.4)
+ tzinfo (~> 0.3.23)
+ activemodel (3.0.0.rc2)
+ activesupport (= 3.0.0.rc2)
+ builder (~> 2.1.2)
+ i18n (~> 0.4.1)
+ activerecord (3.0.0.rc2)
+ activemodel (= 3.0.0.rc2)
+ activesupport (= 3.0.0.rc2)
+ arel (~> 1.0.0.rc1)
+ tzinfo (~> 0.3.23)
+ activeresource (3.0.0.rc2)
+ activemodel (= 3.0.0.rc2)
+ activesupport (= 3.0.0.rc2)
+ activesupport (3.0.0.rc2)
+ arel (1.0.0.rc1)
+ activesupport (>= 3.0.0.beta)
+ bcrypt-ruby (2.1.2)
+ builder (2.1.2)
+ configuration (1.1.0)
+ devise (1.1.2)
+ bcrypt-ruby (~> 2.1.2)
+ warden (~> 0.10.7)
+ diff-lcs (1.1.2)
+ erubis (2.6.6)
+ abstract (>= 1.0.0)
+ i18n (0.4.1)
+ launchy (0.3.7)
+ configuration (>= 0.0.5)
+ rake (>= 0.8.1)
+ mail (2.2.5)
+ activesupport (>= 2.3.6)
+ mime-types
+ treetop (>= 1.4.5)
+ mime-types (1.16)
+ nokogiri (1.4.3.1)
+ polyglot (0.3.1)
+ rack (1.2.1)
+ rack-mount (0.6.12)
+ rack (>= 1.0.0)
+ rack-test (0.5.4)
+ rack (>= 1.0)
+ rails (3.0.0.rc2)
+ actionmailer (= 3.0.0.rc2)
+ actionpack (= 3.0.0.rc2)
+ activerecord (= 3.0.0.rc2)
+ activeresource (= 3.0.0.rc2)
+ activesupport (= 3.0.0.rc2)
+ bundler (>= 1.0.0.rc.6)
+ railties (= 3.0.0.rc2)
+ railties (3.0.0.rc2)
+ actionpack (= 3.0.0.rc2)
+ activesupport (= 3.0.0.rc2)
+ rake (>= 0.8.3)
+ thor (~> 0.14.0)
+ rake (0.8.7)
+ rspec (2.0.0.beta.20)
+ rspec-core (= 2.0.0.beta.20)
+ rspec-expectations (= 2.0.0.beta.20)
+ rspec-mocks (= 2.0.0.beta.20)
+ rspec-core (2.0.0.beta.20)
+ rspec-expectations (2.0.0.beta.20)
+ diff-lcs (>= 1.1.2)
+ rspec-mocks (2.0.0.beta.20)
+ rspec-rails (2.0.0.beta.20)
+ rspec (= 2.0.0.beta.20)
+ sqlite3-ruby (1.3.1)
+ thor (0.14.0)
+ treetop (1.4.8)
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.23)
+ warden (0.10.7)
+ rack (>= 1.0.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ builder
+ devise
+ launchy (>= 0.3.0)
+ rails (= 3.0.0.rc2)
+ rspec-rails (>= 2.0.0.beta.20)
+ sqlite3-ruby
+ webrat!
View
@@ -0,0 +1,7 @@
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+require 'rake'
+
+RailsAdmin::Application.load_tasks
@@ -0,0 +1,3 @@
+class ApplicationController < ActionController::Base
+ protect_from_forgery
+end
Oops, something went wrong.

0 comments on commit 1c237e4

Please sign in to comment.