Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (28 sloc) 767 Bytes
require_relative 'helper'
class GSetTest < HanoverCase
context 'GSet' do
subject { GSet.new }
should 'have entries after addition' do
subject.add :alpha
subject.add :bravo
assert_includes subject, :alpha
assert_includes subject, :bravo
end
should 'merge' do
other = GSet.new
subject.add :charlie
other.add :delta
subject.merge other
assert_includes subject, :charlie
assert_includes subject, :delta
end
should 'json round trip' do
subject.add 'echo'
subject.add 'foxtrot'
subject.add 7
j = subject.to_json
other = GSet.from_json j
assert_equal subject.members, other.members
end
end
end
Something went wrong with that request. Please try again.