Sha256: b08e8249fef54578ca652f958859e93cf8cb105c92577459ccb54cbbef4550c6
Contents?: true
Size: 1.19 KB
Versions: 36
Compression:
Stored size: 1.19 KB
Contents
require 'spec_helper' describe WoopleTheme::Dashboard::StatusAlertPresenter do describe '#css_class' do context 'red status' do subject do data = OpenStruct.new({ color: :red, description: 'FOO' }) WoopleTheme::Dashboard::StatusAlertPresenter.new(data).css_class end it 'returns alert-error' do should eq('alert-error') end end context 'yellow status' do subject do data = OpenStruct.new({ color: :yellow, description: 'FOO' }) WoopleTheme::Dashboard::StatusAlertPresenter.new(data).css_class end it 'returns nil' do should be_nil end end context 'green status' do subject do data = OpenStruct.new({ color: :green, description: 'FOO' }) WoopleTheme::Dashboard::StatusAlertPresenter.new(data).css_class end it 'returns alert-success' do should eq('alert-success') end end end describe '#color' do subject do data = OpenStruct.new({ color: :red, description: 'FOO' }) WoopleTheme::Dashboard::StatusAlertPresenter.new(data).color end it 'returns a capitalized string' do should eq('Red') end end end
Version data entries
36 entries across 36 versions & 1 rubygems