Sha256: 89673326938ce3dd2b29a5480abfefa30fc869bcb850e5f0a5fb3ad588606569

Contents?: true

Size: 437 Bytes

Versions: 10

Compression:

Stored size: 437 Bytes

Contents

require './test/test_helper'
require 'action_controller'
require 'action_controller/test_case'

class CustomStrategyTest < ActionController::TestCase
  tests RendersController

  setup do
    VersionCake::Configuration.any_instance.stubs(:extraction_strategy => lambda { |request| 2 })
  end

  test "renders version 2 of the partial based on the header Accept" do
    get :index
    assert_equal "template v2", @response.body
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
solidus_backend-1.0.0.pre3 vendor/bundle/gems/versioncake-2.3.1/test/functional/custom_strategy_controller_test.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/versioncake-2.3.1/test/functional/custom_strategy_controller_test.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/versioncake-2.3.1/test/functional/custom_strategy_controller_test.rb
versioncake-2.5.0 test/functional/custom_strategy_controller_test.rb
versioncake-2.4.0 test/functional/custom_strategy_controller_test.rb
versioncake-2.3.1 test/functional/custom_strategy_controller_test.rb
versioncake-2.3.0 test/functional/custom_strategy_controller_test.rb
versioncake-2.2.0 test/functional/custom_strategy_controller_test.rb
versioncake-2.1.0 test/functional/custom_strategy_controller_test.rb
versioncake-2.0.0 test/functional/custom_strategy_controller_test.rb