Skip to content

Commit 2afb881

Browse files
Maintain Ruby 1.9 compat
* Avoid Byebug * Avoid keyword args
1 parent de5f663 commit 2afb881

9 files changed

+4
-12
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ gemfiles/*.lock
33
Gemfile.lock
44
.ruby-version
55
pkg
6-
.byebug_history

Gemfile

-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ gemspec
55
gem "rake"
66
gem "mocha", require: false
77
gem "appraisal"
8-
gem "byebug"

gemfiles/rails_4_2.gemfile

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ source "https://rubygems.org"
55
gem "rake"
66
gem "mocha", require: false
77
gem "appraisal"
8-
gem "byebug"
98
gem "rails", "~> 4.2.0"
109

1110
gemspec path: "../"

gemfiles/rails_5_0.gemfile

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ source "https://rubygems.org"
55
gem "rake"
66
gem "mocha", require: false
77
gem "appraisal"
8-
gem "byebug"
98
gem "rails", "~> 5.0.0"
109

1110
gemspec path: "../"

gemfiles/rails_5_1.gemfile

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ source "https://rubygems.org"
55
gem "rake"
66
gem "mocha", require: false
77
gem "appraisal"
8-
gem "byebug"
98
gem "rails", "~> 5.1.0"
109

1110
gemspec path: "../"

gemfiles/rails_5_2.gemfile

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ source "https://rubygems.org"
55
gem "rake"
66
gem "mocha", require: false
77
gem "appraisal"
8-
gem "byebug"
98
gem "rails", "~> 5.2.0"
109

1110
gemspec path: "../"

gemfiles/rails_head.gemfile

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ source "https://rubygems.org"
55
gem "rake"
66
gem "mocha", require: false
77
gem "appraisal"
8-
gem "byebug"
98
gem "rails", github: "rails/rails"
109

1110
gemspec path: "../"

test/jbuilder_template_test.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -293,16 +293,16 @@ def render_without_parsing(source, assigns = {})
293293
view.render(template: "source.json.jbuilder")
294294
end
295295

296-
def build_view(fixtures:, assigns: {})
297-
resolver = ActionView::FixtureResolver.new(fixtures)
296+
def build_view(options = {})
297+
resolver = ActionView::FixtureResolver.new(options.fetch(:fixtures))
298298
lookup_context = ActionView::LookupContext.new([ resolver ], {}, [""])
299299
controller = ActionView::TestCase::TestController.new
300300

301301
# TODO: Use with_empty_template_cache unconditionally after dropping support for Rails <6.0.
302302
view = if ActionView::Base.respond_to?(:with_empty_template_cache)
303-
ActionView::Base.with_empty_template_cache.new(lookup_context, assigns, controller)
303+
ActionView::Base.with_empty_template_cache.new(lookup_context, options.fetch(:assigns, {}), controller)
304304
else
305-
ActionView::Base.new(lookup_context, assigns, controller)
305+
ActionView::Base.new(lookup_context, options.fetch(:assigns, {}), controller)
306306
end
307307

308308
def view.view_cache_dependencies; []; end

test/test_helper.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
require "bundler/setup"
2-
require "byebug"
32

43
require "active_support"
54
require "active_support/core_ext/array/access"

0 commit comments

Comments
 (0)