Sha256: 0d2d8c04cffa06280b16c8405018ae5c8bea6abd4f63159ee533161bf1cbb462

Contents?: true

Size: 1.14 KB

Versions: 1

Compression:

Stored size: 1.14 KB

Contents

require "#{File.expand_path(File.dirname(__FILE__))}/../test_helper"


# require 'rails'
# require 'google_data_source/railtie'
# GoogleDataSource::Railtie.run_initializers


class ReportingRendererTest < Test::Unit::TestCase


  # test "render" do
  #   class TestController < ActionController::Base
  #     def params
  #       {}
  #     end
      
  #     def test(reporting)
  #       render :reporting => reporting
  #     end

  #     def regular
  #       render :text => "foo"
  #     end
  #   end

  #   class TestReporting < ::Reporting
  #   end

  #   reporting  = TestReporting.new
  #   controller = TestController.new
  #   datasource = GoogleDataSource::DataSource::Base.from_params(:reqId => 123)

  #   # stubs
  #   controller.stubs(:render_for_text).returns('')
  #   GoogleDataSource::DataSource::Base.stubs(:from_params).returns(datasource)

  #   # regular rendering should still work
  #   controller.expects(:render_without_reporting).with({:text => "foo"})

  #   # the response of the data source has to be generated
  #   datasource.expects(:response).returns("")

  #   controller.test(reporting)
  #   controller.regular
  # end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
google_data_source-0.7.6 test/rails/reporting_renderer_test.rb