Sha256: c0cc54ab49803a00b670fc6136f16bc70ef4068cd76d80d90d196a0d27775384

Contents?: true

Size: 1.18 KB

Versions: 52

Compression:

Stored size: 1.18 KB

Contents

shared_examples 'a simple pugin feature' do
  before :example do
    described_class.disable
  end

  after :example do
    described_class.disable
  end

  it 'is initially disabled' do
    expect(described_class.enabled?).to equal(false)
  end

  context 'without being altered' do
    it 'returns false when checked if it\'s enabled' do
      expect(described_class.enabled?).to equal(false)
    end
    it 'returns true when checked if it\'s disabled' do
      expect(described_class.disabled?).to equal(true)
    end
  end

  context 'when being enabled' do

    before :each do
      described_class.enable
    end

    it 'returns true when checked if it\'s enabled' do
      expect(described_class.enabled?).to equal(true)
    end
    it 'returns false when checked if it\'s disabled' do
      expect(described_class.disabled?).to equal(false)
    end
  end

  context 'when being disabled' do

    before :each do
      described_class.disable
    end

    it 'returns false when checked if it\'s enabled' do
      expect(described_class.enabled?).to equal(false)
    end
    it 'returns true when checked if it\'s disabled' do
      expect(described_class.disabled?).to equal(true)
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
pugin-1.10.10 spec/support/shared_feature_examples.rb
pugin-1.10.9 spec/support/shared_feature_examples.rb
pugin-1.10.8 spec/support/shared_feature_examples.rb
pugin-1.10.7 spec/support/shared_feature_examples.rb
pugin-1.10.6 spec/support/shared_feature_examples.rb
pugin-1.10.5 spec/support/shared_feature_examples.rb
pugin-1.10.4 spec/support/shared_feature_examples.rb
pugin-1.10.3 spec/support/shared_feature_examples.rb
pugin-1.10.2 spec/support/shared_feature_examples.rb
pugin-1.10.1 spec/support/shared_feature_examples.rb
pugin-1.10.0 spec/support/shared_feature_examples.rb
pugin-1.9.7 spec/support/shared_feature_examples.rb
pugin-1.9.6 spec/support/shared_feature_examples.rb
pugin-1.9.5 spec/support/shared_feature_examples.rb
pugin-1.9.4 spec/support/shared_feature_examples.rb
pugin-1.9.3 spec/support/shared_feature_examples.rb
pugin-1.9.2 spec/support/shared_feature_examples.rb
pugin-1.9.1 spec/support/shared_feature_examples.rb
pugin-1.9.0 spec/support/shared_feature_examples.rb
pugin-1.8.9 spec/support/shared_feature_examples.rb