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 = Hashie::Mash.new countries WorldFlags.raise_error! end it "should list flags using Array" do output = flags_list 32 do flags [:ar, :gb] end output.should == "