Sha256: 5461d13db71d033cf661507f7f781cce4fbd7de0bd16f945dbfd9d68fa52aaf9

Contents?: true

Size: 772 Bytes

Versions: 4

Compression:

Stored size: 772 Bytes

Contents

require 'test_helper'

class SlowControllerTest <  ActionController::TestCase
	test "should profile" do
		get :profile_me, :params => {}
		assert_response :success
		assert_equal "slow action", @response.body
	end

	test "should have mixin" do
	  assert @controller.respond_to?(:process_with_browser_profiling)
	end

	test "should profile param adds profile" do
		get :profile_me, :params => {"browser_profile!" => ""}
		assert_response :success

		assert profiled?(@response.body)
	end

	test "should output to file" do
		clean_outfile

		get :profile_me, :params => {"file_profile!" => ""}
		assert_response :success

		assert ! profiled?(@response.body)
		assert File.exists?(profile_out_file)
		assert profiled?(File.read(profile_out_file))

		clean_outfile
	end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
browser-prof-1.2.6 test/functional/slow_controller_test.rb
browser-prof-1.2.5 test/functional/slow_controller_test.rb
browser-prof-1.2.4 test/functional/slow_controller_test.rb
browser-prof-1.2.3 test/functional/slow_controller_test.rb