Skip to content

Commit aefd98d

Browse files
authored
Merge pull request brainspec#339 from y-yagi/fix_broken_rails_52_test
Fix broken test with Rails 5.2
2 parents 33a3a69 + 7b12902 commit aefd98d

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

Gemfile.rails52

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
eval_gemfile('Gemfile.global')
22

33
gem 'minitest', '~> 5.8'
4-
gem 'rails', '5.2.0.rc1', require: false
4+
gem 'rails', '~> 5.2.0', require: false
55
gem 'activerecord-jdbcsqlite3-adapter', github: 'jruby/activerecord-jdbc-adapter', branch: 'master', platform: :jruby
66
gem 'activerecord-jdbcpostgresql-adapter', github: 'jruby/activerecord-jdbc-adapter', branch: 'master', platform: :jruby
77
gem 'mongoid', github: 'mongodb/mongoid'

test/support/view_test_helper.rb

+12-1
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,21 @@
77
ActionView::RoutingUrlFor.send(:include, ActionDispatch::Routing::UrlFor)
88
end
99

10-
module ViewTestHelper
10+
module SetupAndTeardownHelper
1111
extend ActiveSupport::Concern
1212

1313
include ActiveSupport::Testing::SetupAndTeardown
14+
15+
included do
16+
include ActiveSupport::Callbacks
17+
define_callbacks :setup, :teardown
18+
end
19+
end
20+
21+
module ViewTestHelper
22+
extend ActiveSupport::Concern
23+
24+
include SetupAndTeardownHelper
1425
include ActionView::TestCase::Behavior
1526

1627
included do

0 commit comments

Comments
 (0)