Sha256: e1b1c12903cd214ff41f76c019173c6d5df85debb19590f743f43d6956e4986b
Contents?: true
Size: 919 Bytes
Versions: 1
Compression:
Stored size: 919 Bytes
Contents
require 'spec_helper' describe WorldFlags::Helper::View do include ControllerTestHelpers, WorldFlags::Helper::View def countries locale = :en path = File.join(SPEC_DIR, "../config/countries/locale_countries.#{locale}.json") JSON.parse File.read(path) end before do WorldFlags.auto_select! I18n.locale = :en WorldFlags.available_locales = [:da, :sv, :nb, :en] WorldFlags.reset! WorldFlags.countries = countries WorldFlags.raise_error! end it "should list flags using Array" do output = flags_list 32 do flags [:ar, :gb] end output.should == "<ul class=\"f32 flags\"><li class=\"flag ar\" data-cc=\"ar\" data-country_name=\"Argentina\" data-language_name=\"Spanish\" data-locale=\"ar\"></li><li class=\"flag gb\" data-cc=\"gb\" data-country_name=\"United Kingdom\" data-language_name=\"British English\" data-locale=\"gb\"></li></ul>" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
world-flags-0.6.6 | spec/world_flags/json/json_countries_spec.rb |