forked from iancanderson/ingreedy
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: Taiwan and Thailand to CONTINUOUS_LANGUAGES_LOCALES
- Loading branch information
1 parent
1516428
commit ce01093
Showing
3 changed files
with
90 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
require 'ingreedy/continuous_language_locale' | ||
|
||
RSpec.describe Ingreedy::ContinuousLanguageLocale do | ||
include Ingreedy::ContinuousLanguageLocale | ||
|
||
describe '#use_whitespace?' do | ||
context 'when the locale is a continuous language' do | ||
it 'returns false' do | ||
expect(use_whitespace?(:ja)).to be_falsey | ||
expect(use_whitespace?(:th)).to be_falsey | ||
expect(use_whitespace?(:'zh-TW')).to be_falsey | ||
end | ||
end | ||
|
||
context 'when the locale is not a continuous language' do | ||
it 'returns true' do | ||
expect(use_whitespace?(:en)).to be_truthy | ||
expect(use_whitespace?(:fr)).to be_truthy | ||
expect(use_whitespace?(:'zh-CN')).to be_truthy | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters