Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rumoji
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
rumoji
Commits
3835d46c
Commit
3835d46c
authored
Oct 31, 2012
by
Mark Wunsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minispecs
parent
7ee29060
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
spec/rumoji_spec.rb
+25
-0
No files found.
spec/rumoji_spec.rb
0 → 100644
View file @
3835d46c
# -*- encoding: utf-8 -*-
require
'rumoji'
require
'minitest/spec'
require
'minitest/autorun'
describe
Rumoji
do
before
do
@emoji_map
=
Hash
[
Rumoji
::
EMOJI_NAME_TO_CODEPOINT
.
map
{
|
k
,
v
|
[
k
,
[
v
.
to_i
(
16
)].
pack
(
"U"
)]
}]
end
describe
"#encode"
do
it
"transforms emoji into cheat-sheet form"
do
key
=
:smile
Rumoji
.
encode
(
"
#{
@emoji_map
[
key
]
}
"
).
must_equal
":
#{
key
}
:"
end
end
describe
"#decode"
do
it
"transforms a cheat-sheet code into an emoji"
do
poop_emoji
=
"💩"
Rumoji
.
decode
(
":poop:"
).
must_equal
"
#{
poop_emoji
}
"
end
end
end
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment