File: configurable.rb

package info (click to toggle)
ruby-coercible 1.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 704 kB
  • sloc: ruby: 1,734; makefile: 9
file content (27 lines) | stat: -rw-r--r-- 647 bytes parent folder | download | duplicates (4)
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
26
27
shared_examples_for 'Configurable' do
  describe '.config_name' do
    subject { described_class.config_name }

    it { should be_instance_of(Symbol) }
  end

  describe '.config_keys' do
    subject { described_class.config_keys }

    it { should be_instance_of(Array) }
    it { should_not be_empty }
  end

  describe '.config' do
    subject { described_class.config }

    it { should be_instance_of(Coercible::Configuration) }

    it 'responds to configuration keys' do
      described_class.config_keys.each do |key|
        expect(subject).to respond_to(key)
        expect(subject).to respond_to("#{key}=")
      end
    end
  end
end