Sha256: e08cc70daee4bda1551433e9e16c313d30750ac9d091d008dbcce648d225ae44

Contents?: true

Size: 928 Bytes

Versions: 1

Compression:

Stored size: 928 Bytes

Contents

module ExampleUnit
  include Nyanko::Unit

  shared(:shared) do |args|
    "shared #{args}"
  end

  scope(:controller) do
    function(:test) do
      "test"
    end

    function(:foo) do
      "foo"
    end

    function(:bar) do
      "bar"
    end

    function(:alias) do
      "alias"
    end

    function(:default) do
      run_default
    end

    function(:render) do
      render_to_string :partial => "/test", :locals => { :local => "test" }
    end
  end

  scope(:view) do
    function(:test) do
      "test"
    end

    function(:self) do
      self
    end

    function(:locals) do
      key
    end

    function(:shared) do
      shared("args")
    end

    function(:error) do
      raise_no_method_error
    end

    function(:helper) do
      unit.helper
    end

    function(:render) do
      render "/test", :local => "test"
    end
  end

  helpers do
    def helper
      "helper"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nyanko-0.0.8 spec/fixtures/units/example_unit/example_unit.rb