Sha256: d71d31ce71ac2bec82499726dd1e7bbdba64e41c65ec3de19852b5137ae63322

Contents?: true

Size: 557 Bytes

Versions: 1

Compression:

Stored size: 557 Bytes

Contents

require 'spec_helper'

describe ApplicationHelper do
  describe '#active_nav' do
    context 'when @active_nav' do
      context 'is matches the current' do
        before do
          @active_nav = :foo
        end
        it 'returns the active' do
          expect(helper.active_nav(:foo)).to eq 'active red inverted'
        end
      end
      context 'does not match' do
        before do
          @active_nav = :bar
        end
        it 'returns empty' do
          expect(helper.active_nav(:foo)).to eq ''
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
distribot-ui-0.1.0 spec/helpers/application_helper_spec.rb