Sha256: 3decd4403f8bfe545cfa4556337d2a009da7d2f35faf652c2cd8d0d0ad4b3345

Contents?: true

Size: 1.33 KB

Versions: 18

Compression:

Stored size: 1.33 KB

Contents

module Merb::Test::Fixtures::Controllers
  class Testing < Merb::Controller
    self._template_root = File.dirname(__FILE__) / "views"
  end


  class Responder < Testing
    def index
      render
    end
  end


  class HtmlDefault < Responder; end


  class ClassProvides < Responder
    provides :xml
  end


  class LocalProvides < Responder
    def index
      provides :xml
      render
    end
  end


  class MultiProvides < Responder
    def index
      provides :html, :js
      render
    end
  end

  class ClassAndLocalProvides < Responder
    provides :html    
    def index
      provides :xml
      render
    end
  end

  class ClassOnlyProvides < Responder
    only_provides :text, :xml

    def index
      "nothing"
    end
  end


  class OnlyProvides < Responder
    def index
      only_provides :text, :xml
      "nothing"
    end
  end

  class ClassDoesntProvides < Responder
    provides :xml
    does_not_provide :html

    def index
      "nothing"
    end
  end


  class DoesntProvide < Responder
    def index
      provides :xml
      does_not_provide :html
      "nothing"
    end
  end


  class FooFormatProvides < Responder
    only_provides :foo

    def index
      render "nothing"
    end

    def show
      headers["Content-Language"] = 'nl'
      headers["Biz"] = "buzz"
      render "nothing"
    end
  end
end

Version data entries

18 entries across 12 versions & 3 rubygems

Version Path
merb-core-1.1.3 spec10/public/controller/controllers/responder.rb
merb-core-1.1.3 spec/public/controller/controllers/responder.rb
merb-core-1.1.2 spec10/public/controller/controllers/responder.rb
merb-core-1.1.2 spec/public/controller/controllers/responder.rb
merb-core-1.1.1 spec/public/controller/controllers/responder.rb
merb-core-1.1.1 spec10/public/controller/controllers/responder.rb
merb-core-1.1.0 spec/public/controller/controllers/responder.rb
merb-core-1.1.0 spec10/public/controller/controllers/responder.rb
merb-core-1.1.0.rc1 spec/public/controller/controllers/responder.rb
merb-core-1.1.0.rc1 spec10/public/controller/controllers/responder.rb
merb-core-1.1.0.pre spec10/public/controller/controllers/responder.rb
merb-core-1.1.0.pre spec/public/controller/controllers/responder.rb
thorero-0.9.4.5 spec/public/controller/controllers/responder.rb
merb-core-0.9.4 spec/public/controller/controllers/responder.rb
merb-core-0.9.5 spec/public/controller/controllers/responder.rb
merb-core-0.9.7 spec/public/controller/controllers/responder.rb
merb-core-0.9.6 spec/public/controller/controllers/responder.rb
thorero-core-0.9.4.6 spec/public/controller/controllers/responder.rb