Sha256: f6cd765285259d731583f185cedb144db3da4394fa5b83da1910ac7bdb789635

Contents?: true

Size: 1.36 KB

Versions: 16

Compression:

Stored size: 1.36 KB

Contents

require 'spec_helper'

describe 'Pugin status banner' do

    before :example do 
        Pugin::Feature::StatusBanner.disable
    end

    after :example do
        Pugin::Feature::StatusBanner.disable
    end

    it 'is initially disabled' do 
        expect(Pugin::Feature::StatusBanner.enabled?).to equal(false)
    end

	context 'without being altered' do 
		it "returns false when checked if it's enabled" do
		    expect(Pugin::Feature::StatusBanner.enabled?).to equal(false)
		end
		it "returns true when checked if it's disabled" do 
			expect(Pugin::Feature::StatusBanner.disabled?).to equal(true)
		end
    end

    context 'when being enabled' do

    	before :each do
 		    Pugin::Feature::StatusBanner.enable
    	end 

    	it "returns true when checked if it's enabled" do
    		expect(Pugin::Feature::StatusBanner.enabled?).to equal(true)
    	end
    	it "returns false when checked if it's disabled" do 
    		expect(Pugin::Feature::StatusBanner.disabled?).to equal(false)
    	end
 	end

 	context 'when being disabled' do 

 		before :each do
 		    Pugin::Feature::StatusBanner.disable
    	end 

    	it "returns false when checked if it's enabled" do
    		expect(Pugin::Feature::StatusBanner.enabled?).to equal(false)
    	end
    	it "returns true when checked if it's disabled" do 
    		expect(Pugin::Feature::StatusBanner.disabled?).to equal(true)
    	end
 	end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
pugin-1.0.0.pre spec/lib/pugin/feature/status_banner_spec.rb
pugin-0.9.0 spec/lib/pugin/feature/status_banner_spec.rb
pugin-0.8.9 spec/lib/pugin/feature/status_banner_spec.rb
pugin-0.8.8 spec/lib/pugin/feature/status_banner_spec.rb
pugin-0.8.7 spec/lib/pugin/feature/status_banner_spec.rb
pugin-0.8.7.pre spec/lib/pugin/feature/status_banner_spec.rb
pugin-0.8.6 spec/lib/pugin/feature/status_banner_spec.rb
pugin-0.8.6.pre spec/lib/pugin/feature/status_banner_spec.rb
pugin-0.8.5 spec/lib/pugin/feature/status_banner_spec.rb
pugin-0.8.4 spec/lib/pugin/feature/status_banner_spec.rb
pugin-0.8.3 spec/lib/pugin/feature/status_banner_spec.rb
pugin-0.8.2 spec/lib/pugin/feature/status_banner_spec.rb
pugin-0.8.1 spec/lib/pugin/feature/status_banner_spec.rb
pugin-0.8.0 spec/lib/pugin/feature/status_banner_spec.rb
pugin-0.7.1 spec/lib/pugin/feature/status_banner_spec.rb
pugin-0.7.0 spec/lib/pugin/feature/status_banner_spec.rb