Created
January 24, 2017 11:05
-
-
Save domcleal/df6296853a73ca3f714174278ec01138 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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