# encoding: utf-8 require 'spec_helper' require 'action_view' require 'country_select' describe "CountrySelect" do include ActionView::Helpers::TagHelper include ActionView::Helpers::FormOptionsHelper before do I18n.available_locales = [:en] I18n.locale = :en ISO3166.reset end class Walrus attr_accessor :country_code end let(:walrus) { Walrus.new } let!(:template) { ActionView::Base.new } let(:builder) do if defined?(ActionView::Helpers::Tags::Base) ActionView::Helpers::FormBuilder.new(:walrus, walrus, template, {}) else ActionView::Helpers::FormBuilder.new(:walrus, walrus, template, {}, Proc.new { }) end end let(:select_tag) do <<-EOS.chomp.strip