Skip to content

Instantly share code, notes, and snippets.

@domcleal
Created January 24, 2017 11:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domcleal/df6296853a73ca3f714174278ec01138 to your computer and use it in GitHub Desktop.
Save domcleal/df6296853a73ca3f714174278ec01138 to your computer and use it in GitHub Desktop.
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
gem "rails", github: "rails/rails"
#gem "rails", github: "domcleal/rails", branch: 'ac-params-each-yields'
gem "arel", github: "rails/arel"
end
require "action_controller/railtie"
require "minitest/autorun"
class BugTest < Minitest::Test
def test_ac_parameters_each_yield
yielded = []
ActionController::Parameters.new(a: 'a', b: 'b').each { |arg| yielded << arg }
assert_equal [["a", "a"], ["b", "b"]], yielded
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment