Sha256: 2bb31b6076792acc22359d3cb6a0befef7a083f1bb47b8ee761213586c91829e

Contents?: true

Size: 523 Bytes

Versions: 7

Compression:

Stored size: 523 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
        view.unit(:example_unit).should be_active
        view.unit(:inactive_unit).should_not be_active
      end
    end

    describe "#method_missing" do
      it "calls prefixed method" do
        view.should_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.0.6 spec/chanko/unit_proxy_spec.rb
chanko-2.0.5 spec/chanko/unit_proxy_spec.rb
chanko-2.0.4 spec/chanko/unit_proxy_spec.rb
chanko-2.0.3 spec/chanko/unit_proxy_spec.rb
chanko-2.0.2 spec/chanko/unit_proxy_spec.rb
chanko-2.0.1 spec/chanko/unit_proxy_spec.rb
chanko-2.0.0 spec/chanko/unit_proxy_spec.rb