diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-28 14:25:53 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-31 13:57:24 -0300 |
commit | d4c94accf7efb1136b9764cd00e19f3d90dc047d (patch) | |
tree | da3a3beebe61475369e91063d69297ba4fe2ef1e | |
parent | 5da4d5142a60edda0cb78071553993ee33bb8637 (diff) | |
download | rails-d4c94accf7efb1136b9764cd00e19f3d90dc047d.tar.gz rails-d4c94accf7efb1136b9764cd00e19f3d90dc047d.tar.bz2 rails-d4c94accf7efb1136b9764cd00e19f3d90dc047d.zip |
Remove unneeded tests
These tests are needed only if we are using MiniTest::Spec
-rw-r--r-- | actionmailer/test/spec_type_test.rb | 37 | ||||
-rw-r--r-- | actionmailer/test/test_test.rb | 144 | ||||
-rw-r--r-- | actionpack/test/controller/spec_style_test.rb | 208 | ||||
-rw-r--r-- | actionpack/test/controller/spec_type_test.rb | 37 | ||||
-rw-r--r-- | actionpack/test/dispatch/spec_type_test.rb | 41 | ||||
-rw-r--r-- | actionpack/test/template/spec_type_test.rb | 39 | ||||
-rw-r--r-- | actionpack/test/template/test_test.rb | 56 | ||||
-rw-r--r-- | activesupport/test/spec_type_test.rb | 22 |
8 files changed, 0 insertions, 584 deletions
diff --git a/actionmailer/test/spec_type_test.rb b/actionmailer/test/spec_type_test.rb deleted file mode 100644 index 90db59c2d2..0000000000 --- a/actionmailer/test/spec_type_test.rb +++ /dev/null @@ -1,37 +0,0 @@ -require 'abstract_unit' - -class NotificationMailer < ActionMailer::Base; end -class Notifications < ActionMailer::Base; end - -class SpecTypeTest < ActiveSupport::TestCase - def assert_mailer actual - assert_equal ActionMailer::TestCase, actual - end - - def refute_mailer actual - refute_equal ActionMailer::TestCase, actual - end - - def test_spec_type_resolves_for_class_constants - assert_mailer MiniTest::Spec.spec_type(NotificationMailer) - assert_mailer MiniTest::Spec.spec_type(Notifications) - end - - def test_spec_type_resolves_for_matching_strings - assert_mailer MiniTest::Spec.spec_type("WidgetMailer") - assert_mailer MiniTest::Spec.spec_type("WidgetMailerTest") - assert_mailer MiniTest::Spec.spec_type("Widget Mailer Test") - # And is not case sensitive - assert_mailer MiniTest::Spec.spec_type("widgetmailer") - assert_mailer MiniTest::Spec.spec_type("widgetmailertest") - assert_mailer MiniTest::Spec.spec_type("widget mailer test") - end - - def test_spec_type_wont_match_non_space_characters - refute_mailer MiniTest::Spec.spec_type("Widget Mailer\tTest") - refute_mailer MiniTest::Spec.spec_type("Widget Mailer\rTest") - refute_mailer MiniTest::Spec.spec_type("Widget Mailer\nTest") - refute_mailer MiniTest::Spec.spec_type("Widget Mailer\fTest") - refute_mailer MiniTest::Spec.spec_type("Widget MailerXTest") - end -end diff --git a/actionmailer/test/test_test.rb b/actionmailer/test/test_test.rb index 139eb53359..86fd37bea6 100644 --- a/actionmailer/test/test_test.rb +++ b/actionmailer/test/test_test.rb @@ -26,147 +26,3 @@ class CrazyStringNameMailerTest < ActionMailer::TestCase assert_equal TestTestMailer, self.class.mailer_class end end - -describe TestTestMailer do - it "gets the mailer from the test name" do - assert_equal TestTestMailer, self.class.mailer_class - end -end - -describe TestTestMailer, :action do - it "gets the mailer from the test name" do - assert_equal TestTestMailer, self.class.mailer_class - end -end - -describe TestTestMailer do - describe "nested" do - it "gets the mailer from the test name" do - assert_equal TestTestMailer, self.class.mailer_class - end - end -end - -describe TestTestMailer, :action do - describe "nested" do - it "gets the mailer from the test name" do - assert_equal TestTestMailer, self.class.mailer_class - end - end -end - -describe "TestTestMailer" do - it "gets the mailer from the test name" do - assert_equal TestTestMailer, self.class.mailer_class - end -end - -describe "TestTestMailerTest" do - it "gets the mailer from the test name" do - assert_equal TestTestMailer, self.class.mailer_class - end -end - -describe "TestTestMailer" do - describe "nested" do - it "gets the mailer from the test name" do - assert_equal TestTestMailer, self.class.mailer_class - end - end -end - -describe "TestTestMailerTest" do - describe "nested" do - it "gets the mailer from the test name" do - assert_equal TestTestMailer, self.class.mailer_class - end - end -end - -describe "AnotherCrazySymbolNameMailerTest" do - tests :test_test_mailer - - it "gets the mailer after setting it with a symbol" do - assert_equal TestTestMailer, self.class.mailer_class - end -end - -describe "AnotherCrazyStringNameMailerTest" do - tests 'test_test_mailer' - - it "gets the mailer after setting it with a string" do - assert_equal TestTestMailer, self.class.mailer_class - end -end - -describe "Another Crazy Name Mailer Test" do - tests TestTestMailer - - it "gets the mailer after setting it manually" do - assert_equal TestTestMailer, self.class.mailer_class - end -end - -describe "Another Crazy Symbol Name Mailer Test" do - tests :test_test_mailer - - it "gets the mailer after setting it with a symbol" do - assert_equal TestTestMailer, self.class.mailer_class - end -end - -describe "Another Crazy String Name Mailer Test" do - tests 'test_test_mailer' - - it "gets the mailer after setting it with a string" do - assert_equal TestTestMailer, self.class.mailer_class - end -end - -describe "AnotherCrazySymbolNameMailerTest" do - tests :test_test_mailer - - describe "nested" do - it "gets the mailer after setting it with a symbol" do - assert_equal TestTestMailer, self.class.mailer_class - end - end -end - -describe "AnotherCrazyStringNameMailerTest" do - tests 'test_test_mailer' - - describe "nested" do - it "gets the mailer after setting it with a string" do - assert_equal TestTestMailer, self.class.mailer_class - end - end -end - -describe "Another Crazy Name Mailer Test" do - tests TestTestMailer - - describe "nested" do - it "gets the mailer after setting it manually" do - assert_equal TestTestMailer, self.class.mailer_class - end - end -end - -describe "Another Crazy Symbol Name Mailer Test" do - tests :test_test_mailer - - describe "nested" do - it "gets the mailer after setting it with a symbol" do - assert_equal TestTestMailer, self.class.mailer_class - end - end -end - -describe "Another Crazy String Name Mailer Test" do - tests 'test_test_mailer' - - it "gets the mailer after setting it with a string" do - assert_equal TestTestMailer, self.class.mailer_class - end -end diff --git a/actionpack/test/controller/spec_style_test.rb b/actionpack/test/controller/spec_style_test.rb deleted file mode 100644 index e118c584ca..0000000000 --- a/actionpack/test/controller/spec_style_test.rb +++ /dev/null @@ -1,208 +0,0 @@ -require "abstract_unit" - -class ApplicationController < ActionController::Base; end -class ModelsController < ApplicationController; end -module Admin - class WidgetsController < ApplicationController; end -end - -# ApplicationController -describe ApplicationController do - describe "nested" do - describe "even deeper" do - it "exists" do - assert_kind_of ApplicationController, @controller - end - end - end -end - -describe ApplicationController, :index do - describe "nested" do - describe "even deeper" do - it "exists" do - assert_kind_of ApplicationController, @controller - end - end - end -end - -describe ApplicationController, "unauthenticated user" do - describe "nested" do - describe "even deeper" do - it "exists" do - assert_kind_of ApplicationController, @controller - end - end - end -end - -describe "ApplicationControllerTest" do - describe "nested" do - describe "even deeper" do - it "exists" do - assert_kind_of ApplicationController, @controller - end - end - end -end - -describe "ApplicationControllerTest", :index do - describe "nested" do - describe "even deeper" do - it "exists" do - assert_kind_of ApplicationController, @controller - end - end - end -end - -describe "ApplicationControllerTest", "unauthenticated user" do - describe "nested" do - describe "even deeper" do - it "exists" do - assert_kind_of ApplicationController, @controller - end - end - end -end - -# ModelsController -describe ModelsController do - describe "nested" do - describe "even deeper" do - it "exists" do - assert_kind_of ModelsController, @controller - end - end - end -end - -describe ModelsController, :index do - describe "nested" do - describe "even deeper" do - it "exists" do - assert_kind_of ModelsController, @controller - end - end - end -end - -describe ModelsController, "unauthenticated user" do - describe "nested" do - describe "even deeper" do - it "exists" do - assert_kind_of ModelsController, @controller - end - end - end -end - -describe "ModelsControllerTest" do - describe "nested" do - describe "even deeper" do - it "exists" do - assert_kind_of ModelsController, @controller - end - end - end -end - -describe "ModelsControllerTest", :index do - describe "nested" do - describe "even deeper" do - it "exists" do - assert_kind_of ModelsController, @controller - end - end - end -end - -describe "ModelsControllerTest", "unauthenticated user" do - describe "nested" do - describe "even deeper" do - it "exists" do - assert_kind_of ModelsController, @controller - end - end - end -end - -# Nested Admin::WidgetsControllerTest -module Admin - class WidgetsControllerTest < ActionController::TestCase - test "exists" do - assert_kind_of Admin::WidgetsController, @controller - end - end - - describe WidgetsController do - describe "index" do - it "respond successful" do - assert_kind_of Admin::WidgetsController, @controller - end - end - end - - describe WidgetsController, "unauthenticated users" do - describe "index" do - it "respond successful" do - assert_kind_of Admin::WidgetsController, @controller - end - end - end -end - -class Admin::WidgetsControllerTest < ActionController::TestCase - test "exists here too" do - assert_kind_of Admin::WidgetsController, @controller - end -end - -describe Admin::WidgetsController do - describe "index" do - it "respond successful" do - assert_kind_of Admin::WidgetsController, @controller - end - end -end - -describe Admin::WidgetsController, "unauthenticated users" do - describe "index" do - it "respond successful" do - assert_kind_of Admin::WidgetsController, @controller - end - end -end - -describe "Admin::WidgetsController" do - describe "index" do - it "respond successful" do - assert_kind_of Admin::WidgetsController, @controller - end - end -end - -describe "Admin::WidgetsControllerTest" do - describe "index" do - it "respond successful" do - assert_kind_of Admin::WidgetsController, @controller - end - end -end - -describe "Admin::WidgetsController", "unauthenticated users" do - describe "index" do - it "respond successful" do - assert_kind_of Admin::WidgetsController, @controller - end - end -end - -describe "Admin::WidgetsControllerTest", "unauthenticated users" do - describe "index" do - it "respond successful" do - assert_kind_of Admin::WidgetsController, @controller - end - end -end diff --git a/actionpack/test/controller/spec_type_test.rb b/actionpack/test/controller/spec_type_test.rb deleted file mode 100644 index 13be8a3405..0000000000 --- a/actionpack/test/controller/spec_type_test.rb +++ /dev/null @@ -1,37 +0,0 @@ -require "abstract_unit" - -class ApplicationController < ActionController::Base; end -class ModelsController < ApplicationController; end - -class ActionControllerSpecTypeTest < ActiveSupport::TestCase - def assert_controller actual - assert_equal ActionController::TestCase, actual - end - - def refute_controller actual - refute_equal ActionController::TestCase, actual - end - - def test_spec_type_resolves_for_class_constants - assert_controller MiniTest::Spec.spec_type(ApplicationController) - assert_controller MiniTest::Spec.spec_type(ModelsController) - end - - def test_spec_type_resolves_for_matching_strings - assert_controller MiniTest::Spec.spec_type("WidgetController") - assert_controller MiniTest::Spec.spec_type("WidgetControllerTest") - assert_controller MiniTest::Spec.spec_type("Widget Controller Test") - # And is not case sensitive - assert_controller MiniTest::Spec.spec_type("widgetcontroller") - assert_controller MiniTest::Spec.spec_type("widgetcontrollertest") - assert_controller MiniTest::Spec.spec_type("widget controller test") - end - - def test_spec_type_wont_match_non_space_characters - refute_controller MiniTest::Spec.spec_type("Widget Controller\tTest") - refute_controller MiniTest::Spec.spec_type("Widget Controller\rTest") - refute_controller MiniTest::Spec.spec_type("Widget Controller\nTest") - refute_controller MiniTest::Spec.spec_type("Widget Controller\fTest") - refute_controller MiniTest::Spec.spec_type("Widget ControllerXTest") - end -end diff --git a/actionpack/test/dispatch/spec_type_test.rb b/actionpack/test/dispatch/spec_type_test.rb deleted file mode 100644 index 6cd19fd333..0000000000 --- a/actionpack/test/dispatch/spec_type_test.rb +++ /dev/null @@ -1,41 +0,0 @@ -require "abstract_unit" - -class SpecTypeTest < ActiveSupport::TestCase - def assert_dispatch actual - assert_equal ActionDispatch::IntegrationTest, actual - end - - def refute_dispatch actual - refute_equal ActionDispatch::IntegrationTest, actual - end - - def test_spec_type_resolves_for_matching_acceptance_strings - assert_dispatch MiniTest::Spec.spec_type("WidgetAcceptanceTest") - assert_dispatch MiniTest::Spec.spec_type("Widget Acceptance Test") - assert_dispatch MiniTest::Spec.spec_type("widgetacceptancetest") - assert_dispatch MiniTest::Spec.spec_type("widget acceptance test") - end - - def test_spec_type_wont_match_non_space_characters_acceptance - refute_dispatch MiniTest::Spec.spec_type("Widget Acceptance\tTest") - refute_dispatch MiniTest::Spec.spec_type("Widget Acceptance\rTest") - refute_dispatch MiniTest::Spec.spec_type("Widget Acceptance\nTest") - refute_dispatch MiniTest::Spec.spec_type("Widget Acceptance\fTest") - refute_dispatch MiniTest::Spec.spec_type("Widget AcceptanceXTest") - end - - def test_spec_type_resolves_for_matching_integration_strings - assert_dispatch MiniTest::Spec.spec_type("WidgetIntegrationTest") - assert_dispatch MiniTest::Spec.spec_type("Widget Integration Test") - assert_dispatch MiniTest::Spec.spec_type("widgetintegrationtest") - assert_dispatch MiniTest::Spec.spec_type("widget integration test") - end - - def test_spec_type_wont_match_non_space_characters_integration - refute_dispatch MiniTest::Spec.spec_type("Widget Integration\tTest") - refute_dispatch MiniTest::Spec.spec_type("Widget Integration\rTest") - refute_dispatch MiniTest::Spec.spec_type("Widget Integration\nTest") - refute_dispatch MiniTest::Spec.spec_type("Widget Integration\fTest") - refute_dispatch MiniTest::Spec.spec_type("Widget IntegrationXTest") - end -end diff --git a/actionpack/test/template/spec_type_test.rb b/actionpack/test/template/spec_type_test.rb deleted file mode 100644 index 08a7bdf81d..0000000000 --- a/actionpack/test/template/spec_type_test.rb +++ /dev/null @@ -1,39 +0,0 @@ -require 'abstract_unit' - -class ActionViewSpecTypeTest < ActiveSupport::TestCase - def assert_view actual - assert_equal ActionView::TestCase, actual - end - - def refute_view actual - refute_equal ActionView::TestCase, actual - end - - def test_spec_type_resolves_for_matching_helper_strings - assert_view MiniTest::Spec.spec_type("WidgetHelper") - assert_view MiniTest::Spec.spec_type("WidgetHelperTest") - assert_view MiniTest::Spec.spec_type("Widget Helper Test") - # And is not case sensitive - assert_view MiniTest::Spec.spec_type("widgethelper") - assert_view MiniTest::Spec.spec_type("widgethelpertest") - assert_view MiniTest::Spec.spec_type("widget helper test") - end - - def test_spec_type_resolves_for_matching_view_strings - assert_view MiniTest::Spec.spec_type("WidgetView") - assert_view MiniTest::Spec.spec_type("WidgetViewTest") - assert_view MiniTest::Spec.spec_type("Widget View Test") - # And is not case sensitive - assert_view MiniTest::Spec.spec_type("widgetview") - assert_view MiniTest::Spec.spec_type("widgetviewtest") - assert_view MiniTest::Spec.spec_type("widget view test") - end - - def test_spec_type_wont_match_non_space_characters - refute_view MiniTest::Spec.spec_type("Widget Helper\tTest") - refute_view MiniTest::Spec.spec_type("Widget Helper\rTest") - refute_view MiniTest::Spec.spec_type("Widget Helper\nTest") - refute_view MiniTest::Spec.spec_type("Widget Helper\fTest") - refute_view MiniTest::Spec.spec_type("Widget HelperXTest") - end -end diff --git a/actionpack/test/template/test_test.rb b/actionpack/test/template/test_test.rb index e843a1deb4..108a674d95 100644 --- a/actionpack/test/template/test_test.rb +++ b/actionpack/test/template/test_test.rb @@ -78,59 +78,3 @@ class CrazyStringHelperTest < ActionView::TestCase assert_equal PeopleHelper, self.class.helper_class end end - -describe PeopleHelper do - it "resolves the right helper_class" do - assert_equal PeopleHelper, self.class.helper_class - end -end - -describe PeopleHelper, :helper_class do - it "resolves the right helper_class" do - assert_equal PeopleHelper, self.class.helper_class - end -end - -describe PeopleHelper do - describe "even while nested" do - it "resolves the right helper_class" do - assert_equal PeopleHelper, self.class.helper_class - end - end -end - -describe PeopleHelper, :helper_class do - describe "even while nested" do - it "resolves the right helper_class" do - assert_equal PeopleHelper, self.class.helper_class - end - end -end - -describe "PeopleHelper" do - it "resolves the right helper_class" do - assert_equal PeopleHelper, self.class.helper_class - end -end - -describe "PeopleHelperTest" do - it "resolves the right helper_class" do - assert_equal PeopleHelper, self.class.helper_class - end -end - -describe "PeopleHelper" do - describe "even while nested" do - it "resolves the right helper_class" do - assert_equal PeopleHelper, self.class.helper_class - end - end -end - -describe "PeopleHelperTest" do - describe "even while nested" do - it "resolves the right helper_class" do - assert_equal PeopleHelper, self.class.helper_class - end - end -end diff --git a/activesupport/test/spec_type_test.rb b/activesupport/test/spec_type_test.rb deleted file mode 100644 index 9a6cb4ded2..0000000000 --- a/activesupport/test/spec_type_test.rb +++ /dev/null @@ -1,22 +0,0 @@ -require "abstract_unit" -require "active_record" - -class SomeRandomModel < ActiveRecord::Base; end - -class SpecTypeTest < ActiveSupport::TestCase - def assert_support actual - assert_equal ActiveSupport::TestCase, actual - end - - def assert_spec actual - assert_equal MiniTest::Spec, actual - end - - def test_spec_type_resolves_for_active_record_constants - assert_support MiniTest::Spec.spec_type(SomeRandomModel) - end - - def test_spec_type_doesnt_resolve_random_strings - assert_spec MiniTest::Spec.spec_type("Unmatched String") - end -end |