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
faac503b
Commit
faac503b
authored
Sep 02, 2014
by
Mark Wunsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update spec to avoid minitest error
parent
6d51c152
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
spec/rumoji/emoji_spec.rb
+5
-5
No files found.
spec/rumoji/emoji_spec.rb
View file @
faac503b
...
...
@@ -5,14 +5,14 @@ require 'minitest/autorun'
describe
Rumoji
::
Emoji
do
let
(
:symbols
)
{
[
:hankey
,
:poop
,
:shit
]
}
let
(
:name
)
{
"PILE OF POO"
}
let
(
:
emoji_
name
)
{
"PILE OF POO"
}
let
(
:poo_string
)
{
"
\u
{1F4A9}"
}
subject
do
Rumoji
::
Emoji
.
new
(
poo_string
,
symbols
,
name
)
Rumoji
::
Emoji
.
new
(
poo_string
,
symbols
,
emoji_
name
)
end
it
(
"has a name"
)
{
subject
.
name
.
must_equal
name
}
it
(
"has a name"
)
{
subject
.
name
.
must_equal
emoji_
name
}
it
(
"has a cheat sheet code"
)
{
symbols
.
must_include
subject
.
code
[
1
...-
1
].
intern
}
it
(
"can test if it includes a cheat sheet code"
)
{
symbols
.
all?
{
|
symbol
|
subject
.
include?
(
symbol
)
}.
must_equal
true
}
it
(
"converts to the emoji string"
)
{
subject
.
to_s
.
must_equal
poo_string
}
...
...
@@ -44,11 +44,11 @@ describe Rumoji::Emoji do
#
# http://www.unicode.org/versions/Unicode6.2.0/
let
(
:symbol
)
{
:us
}
let
(
:name
)
{
"REGIONAL INDICATOR SYMBOL LETTERS US"
}
let
(
:
emoji_
name
)
{
"REGIONAL INDICATOR SYMBOL LETTERS US"
}
let
(
:us_string
)
{
"
\xF0\x9F\x87\xBA\xF0\x9F\x87\xB8
"
}
subject
do
Rumoji
::
Emoji
.
new
(
us_string
,
symbol
,
name
)
Rumoji
::
Emoji
.
new
(
us_string
,
symbol
,
emoji_
name
)
end
it
(
"has one symbol, representing the code"
)
{
subject
.
symbol
.
must_equal
symbol
}
...
...
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