Sha256: 0f61178f930b6286af6ff719ccf8f2caa0df3f42a27e94ea261c2071ab19e71b

Contents?: true

Size: 644 Bytes

Versions: 2

Compression:

Stored size: 644 Bytes

Contents

require 'spec_helper'

class Xaz
end

describe CanTango::Config::Ability::Modes::Execution do
  subject { CanTango::Config::Ability::Modes::Execution.instance }

  describe 'valid mode=' do
    before do
      subject.register :cache
    end
    specify { subject.registered.should include :cache }
  end

  describe 'clear! and invalid mode=' do
    before do
      subject.clear!
      subject.register Xaz
    end

    specify { subject.registered.should be_empty }
  end

  describe 'reset!' do
    before do
      subject.register :a, :b
      subject.reset!
    end

    specify { subject.registered.should == subject.default }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cantango-config-0.2.1 spec/cantango/config/ability/modes/execution_spec.rb
cantango-config-0.2.0 spec/cantango/config/ability/modes/execution_spec.rb