File: config_file_spec.rb

package info (click to toggle)
ruby-simple-navigation 4.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 488 kB
  • ctags: 255
  • sloc: ruby: 3,693; makefile: 3
file content (25 lines) | stat: -rw-r--r-- 636 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require 'simple_navigation/config_file'

module SimpleNavigation
  describe ConfigFile do
    subject(:config_file) { ConfigFile.new(context) }

    let(:context) { :default }

    describe '#name' do
      context 'when the context is :default' do
        it 'returns navigation.rb' do
          expect(config_file.name).to eq 'navigation.rb'
        end
      end

      context 'when the context is different from :default' do
        let(:context) { :HelloWorld }

        it 'returns UNDERSCORED_CONTEXT_navigation.rb' do
          expect(config_file.name).to eq 'hello_world_navigation.rb'
        end
      end
    end
  end
end