aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-10-14 20:00:57 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-11-28 22:46:49 -0200
commitccecab3ba950a288b61a516bf9b6962e384aae0b (patch)
treef00e408870bb2230d7a210e6ae170feef0a80308 /railties/test/generators
parente38d310912a610ffe8a0944a533bfb9e5950f3a5 (diff)
downloadrails-ccecab3ba950a288b61a516bf9b6962e384aae0b.tar.gz
rails-ccecab3ba950a288b61a516bf9b6962e384aae0b.tar.bz2
rails-ccecab3ba950a288b61a516bf9b6962e384aae0b.zip
Remove observers and sweepers
They was extracted from a plugin. See https://github.com/rails/rails-observers [Rafael Mendonça França + Steve Klabnik]
Diffstat (limited to 'railties/test/generators')
-rw-r--r--railties/test/generators/namespaced_generators_test.rb21
-rw-r--r--railties/test/generators/observer_generator_test.rb27
2 files changed, 0 insertions, 48 deletions
diff --git a/railties/test/generators/namespaced_generators_test.rb b/railties/test/generators/namespaced_generators_test.rb
index db268ed6f2..a4d8b3d1b0 100644
--- a/railties/test/generators/namespaced_generators_test.rb
+++ b/railties/test/generators/namespaced_generators_test.rb
@@ -1,7 +1,6 @@
require 'generators/generators_test_helper'
require 'rails/generators/rails/controller/controller_generator'
require 'rails/generators/rails/model/model_generator'
-require 'rails/generators/rails/observer/observer_generator'
require 'rails/generators/mailer/mailer_generator'
require 'rails/generators/rails/scaffold/scaffold_generator'
@@ -142,26 +141,6 @@ class NamespacedModelGeneratorTest < NamespacedGeneratorTestCase
end
end
-class NamespacedObserverGeneratorTest < NamespacedGeneratorTestCase
- arguments %w(account)
- tests Rails::Generators::ObserverGenerator
-
- def test_invokes_default_orm
- run_generator
- assert_file "app/models/test_app/account_observer.rb", /module TestApp/, / class AccountObserver < ActiveRecord::Observer/
- end
-
- def test_invokes_default_orm_with_class_path
- run_generator ["admin/account"]
- assert_file "app/models/test_app/admin/account_observer.rb", /module TestApp/, / class Admin::AccountObserver < ActiveRecord::Observer/
- end
-
- def test_invokes_default_test_framework
- run_generator
- assert_file "test/models/test_app/account_observer_test.rb", /module TestApp/, / class AccountObserverTest < ActiveSupport::TestCase/
- end
-end
-
class NamespacedMailerGeneratorTest < NamespacedGeneratorTestCase
arguments %w(notifier foo bar)
tests Rails::Generators::MailerGenerator
diff --git a/railties/test/generators/observer_generator_test.rb b/railties/test/generators/observer_generator_test.rb
deleted file mode 100644
index 1231827466..0000000000
--- a/railties/test/generators/observer_generator_test.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-require 'generators/generators_test_helper'
-require 'rails/generators/rails/observer/observer_generator'
-
-class ObserverGeneratorTest < Rails::Generators::TestCase
- include GeneratorsTestHelper
- arguments %w(account)
-
- def test_invokes_default_orm
- run_generator
- assert_file "app/models/account_observer.rb", /class AccountObserver < ActiveRecord::Observer/
- end
-
- def test_invokes_default_orm_with_class_path
- run_generator ["admin/account"]
- assert_file "app/models/admin/account_observer.rb", /class Admin::AccountObserver < ActiveRecord::Observer/
- end
-
- def test_invokes_default_test_framework
- run_generator
- assert_file "test/models/account_observer_test.rb", /class AccountObserverTest < ActiveSupport::TestCase/
- end
-
- def test_logs_if_the_test_framework_cannot_be_found
- content = run_generator ["account", "--test-framework=rspec"]
- assert_match(/rspec \[not found\]/, content)
- end
-end