⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (896 Bytes)
Bug #10724
» test_tracepoint_with_domain_name.rb
deivid (David Rodríguez)
, 01/09/2015 10:43 AM
require
'test/unit'
class
TestTracepointWithDomainName
<
Test
::
Unit
::
TestCase
def
setup
require
'domain_name'
end
def
test_tracepoint_with_domain_name_gem
events
=
[]
tracepoint
=
TracePoint
.
new
(
:call
,
:return
)
do
|
tp
|
events
<<
[
tp
.
event
,
tp
.
method_id
]
end
tracepoint
.
enable
{
DomainName
.
new
(
'google.com'
)
}
expected_events
=
[
[
:call
,
:initialize
],
[
:call
,
:normalize
],
[
:call
,
:to_nfc
],
[
:return
,
:to_nfc
],
[
:call
,
:encode_hostname
],
[
:return
,
:encode_hostname
],
[
:return
,
:normalize
],
[
:call
,
:etld_data
],
[
:return
,
:etld_data
],
[
:return
,
:initialize
]
]
assert_equal
expected_events
,
events
end
end
« Previous
1
2
Next »
(1-1/2)
Loading...