Sha256: 7756884721cfe2ed6ca5dbd2c9ebce063a1542dd100c8a8b0181be35b24896ad

Contents?: true

Size: 535 Bytes

Versions: 7

Compression:

Stored size: 535 Bytes

Contents

require "spec_helper"

module Chanko
  describe UnitProxy do
    let(:view) do
      Class.new { include UnitProxyProvider }.new
    end

    describe "#active?" do
      it "returns activation status of unit" do
        expect(view.unit(:example_unit)).to be_active
        expect(view.unit(:inactive_unit)).not_to be_active
      end
    end

    describe "#method_missing" do
      it "calls prefixed method" do
        expect(view).to receive(:__example_unit_test)
        view.unit(:example_unit).test
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
chanko-2.3.0 spec/chanko/unit_proxy_spec.rb
chanko-2.2.1 spec/chanko/unit_proxy_spec.rb
chanko-2.2.0 spec/chanko/unit_proxy_spec.rb
chanko-2.1.1 spec/chanko/unit_proxy_spec.rb
chanko-2.1.0 spec/chanko/unit_proxy_spec.rb
chanko-2.0.8 spec/chanko/unit_proxy_spec.rb
chanko-2.0.7 spec/chanko/unit_proxy_spec.rb