Sha256: d98ba93312b343b7631ddba3b431c015b785b736a5010cd207625b7a0cea665e

Contents?: true

Size: 677 Bytes

Versions: 7

Compression:

Stored size: 677 Bytes

Contents

require "spec_helper"
require "chanko/test"

module Chanko
  describe Test do
    let(:view) do
      Class.new(ActionView::Base) do
        include Chanko::Invoker
        include Chanko::Helper
        include Chanko::UnitProxyProvider
      end.new
    end

    describe "#enable_unit" do
      it "forces to enable specified unit" do
        enable_unit(:inactive_unit)
        view.invoke(:inactive_unit, :inactive, :type => :plain).should == "inactive"
      end
    end

    describe "#disable_unit" do
      it "forces to disable specified unit" do
        disable_unit(:example_unit)
        view.invoke(:example_unit, :test).should == nil
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
chanko-2.0.6 spec/chanko/test_spec.rb
chanko-2.0.5 spec/chanko/test_spec.rb
chanko-2.0.4 spec/chanko/test_spec.rb
chanko-2.0.3 spec/chanko/test_spec.rb
chanko-2.0.2 spec/chanko/test_spec.rb
chanko-2.0.1 spec/chanko/test_spec.rb
chanko-2.0.0 spec/chanko/test_spec.rb