Skip to content

Commit e8475dc

Browse files
committed
cleanup and remove own solution (depends on rspec/rspec-core#1089)
1 parent d125b6f commit e8475dc

9 files changed

+0
-14
lines changed

lib/rspec/rails/example/controller_example_group.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ def method_missing(method, *args, &block)
146146
subject { controller }
147147

148148
metadata[:type] = :controller
149-
hooks.register_globals(self, RSpec.configuration.hooks)
150149

151150
before do
152151
self.routes = ::Rails.application.routes

lib/rspec/rails/example/feature_example_group.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ module FeatureExampleGroup
77

88
included do
99
metadata[:type] = :feature
10-
hooks.register_globals(self, RSpec.configuration.hooks)
1110

1211
app = ::Rails.application
1312
if app.respond_to?(:routes)

lib/rspec/rails/example/helper_example_group.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ def _controller_path(example)
3131

3232
included do
3333
metadata[:type] = :helper
34-
hooks.register_globals(self, RSpec.configuration.hooks)
3534

3635
before do |example|
3736
controller.controller_path = _controller_path(example)

lib/rspec/rails/example/mailer_example_group.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ module MailerExampleGroup
77

88
included do
99
metadata[:type] = :mailer
10-
hooks.register_globals(self, RSpec.configuration.hooks)
1110

1211
include ::Rails.application.routes.url_helpers
1312
options = ::Rails.configuration.action_mailer.default_url_options

lib/rspec/rails/example/model_example_group.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ module ModelExampleGroup
55

66
included do
77
metadata[:type] = :model
8-
hooks.register_globals(self, RSpec.configuration.hooks)
98
end
109
end
1110
end

lib/rspec/rails/example/rails_example_group.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ module RailsExampleGroup
1010
include RSpec::Rails::MinitestLifecycleAdapter if ::Rails::VERSION::STRING >= '4'
1111
include RSpec::Rails::MinitestAssertionAdapter
1212
include RSpec::Rails::Matchers
13-
14-
def set_metadata_type(type)
15-
metadata[:type] = type
16-
hooks.register_globals(self, RSpec.configuration.hooks)
17-
end
18-
1913
end
2014
end
2115
end

lib/rspec/rails/example/request_example_group.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ def app
1414

1515
included do
1616
metadata[:type] = :request
17-
hooks.register_globals(self, RSpec.configuration.hooks)
1817

1918
before do
2019
@routes = ::Rails.application.routes

lib/rspec/rails/example/routing_example_group.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ def routes(&blk)
3131

3232
included do
3333
metadata[:type] = :routing
34-
hooks.register_globals(self, RSpec.configuration.hooks)
3534

3635
before do
3736
self.routes = ::Rails.application.routes

lib/rspec/rails/example/view_example_group.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ def _include_controller_helpers
143143
include ExampleMethods
144144

145145
metadata[:type] = :view
146-
hooks.register_globals(self, RSpec.configuration.hooks)
147146

148147
helper(*_default_helpers)
149148

0 commit comments

Comments
 (0)