Skip to content

Commit

Permalink
add a whitelist for regionless locales
Browse files Browse the repository at this point in the history
  • Loading branch information
inukshuk committed Jan 28, 2014
1 parent 6ba17b7 commit 7baf5da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion spec/locales_spec.rb
Expand Up @@ -25,7 +25,7 @@

it "has a region" do
locale.region.should_not be_empty
end unless id == 'locales-eu'
end unless NO_REGIONS.include?(locale.language.to_s)

it "its language and region match the filename" do
locale.to_s.should == id[8,5]
Expand Down
4 changes: 4 additions & 0 deletions spec/spec_helper.rb
Expand Up @@ -2,6 +2,10 @@

LOCALE_ROOT = File.expand_path('../..', __FILE__)

NO_REGIONS = %w{
eu ar
}

def load_locale(path)
filename = File.basename(path)
id = filename[0..-5]
Expand Down

0 comments on commit 7baf5da

Please sign in to comment.