Sha256: f7585c6f74c12fce2a599861efa6a0cf45449ccbe6409df30b0f98efc9aa81e1
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
require 'spec_helper' describe WorldFlagsHelper do include ControllerTestHelpers, WorldFlagsHelper it "should be empty, with an empty block" do output = flags_list do end output.should == "<ul class=\"f16\"></ul>" end it "should set size to 16 or 32" do lambda do flags_list(8) { } end.should raise_error end it "should set size to 16 or 32" do output = flags_list 32 do end output.should == "<ul class=\"f32\"></ul>" end it "should list flags" do output = flags_list 32 do flags :ar => 'Argentina', :en => 'England' end output.should == "<ul class=\"f32\"><li class=\"flag ar\">Argentina</li><li class=\"flag en\">England</li></ul>" end it "should list flags combined" do output = flags_list 32 do [flags(:ar => 'Argentina', :en => 'England'), flag(:br, 'Brazil')].join.html_safe end output.should == "<ul class=\"f32\"><li class=\"flag ar\">Argentina</li><li class=\"flag en\">England</li><li class=\"flag br\">Brazil</li></ul>" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
world-flags-0.1.1 | spec/world-flags_spec.rb |