Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 8f6ce1a17e
Fetching contributors…

Cannot retrieve contributors at this time

11 lines (9 sloc) 0.23 kB
require 'abstract_unit'
require 'active_support/core_ext/struct'
class StructExt < ActiveSupport::TestCase
def test_to_h
x = Struct.new(:foo, :bar)
z = x.new(1, 2)
assert_equal({ foo: 1, bar: 2 }, z.to_h)
end
end
Jump to Line
Something went wrong with that request. Please try again.