Sha256: 04d95eb0b14b867232a0a3520081de717710583bca0c75cd2f29c4457d2c0232
Contents?: true
Size: 786 Bytes
Versions: 3
Compression:
Stored size: 786 Bytes
Contents
require 'spec_helper' describe CountryFlags::Helper do include CountryFlags::Helper describe '#country_flag_path' do it 'throws exception if wrong format given' do expect { country_flag_path('bg', :tiff) }.to raise_error(ArgumentError) end it 'does not throw exception if format given in string' do expect { country_flag_path('bg', 'gif') }.to raise_error(ArgumentError) end it 'returns image path' do expect(country_flag_path('bg', :png)).to be_a(String) end end describe '#country_flag' do it 'returns image tag' do expect(country_flag('bg')).to be_a(String) end it 'throws exception if wrong format given' do expect { country_flag('bg', format: :tiff) }.to raise_error(ArgumentError) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
country_flags-0.1.2 | spec/country_flags/helper_spec.rb |
country_flags-0.1.1 | spec/country_flags/helper_spec.rb |
country_flags-0.1.0 | spec/country_flags/helper_spec.rb |