Sha256: 5ea79490842b43e4b4069a9c0ca47a5fddf188817ac1abe29a0ef6973cd02b66

Contents?: true

Size: 587 Bytes

Versions: 25

Compression:

Stored size: 587 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module ControllerExampleGroup
    extend ActiveSupport::Concern

    class_methods do
      def routes
        before do
          routes = yield
          @orig_default_url_options = routes.default_url_options.dup
          routes.default_url_options[:script_name] = ""

          self.routes = routes
        end

        after do
          routes.default_url_options = @orig_default_url_options
        end
      end
    end
  end
end

RSpec.configure do |config|
  config.include Decidim::ControllerExampleGroup, type: :controller
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
decidim-dev-0.29.1 lib/decidim/dev/test/rspec_support/controller_example_group.rb
decidim-dev-0.28.4 lib/decidim/dev/test/rspec_support/controller_example_group.rb
decidim-dev-0.27.9 lib/decidim/dev/test/rspec_support/controller_example_group.rb
decidim-dev-0.29.0 lib/decidim/dev/test/rspec_support/controller_example_group.rb
decidim-dev-0.28.3 lib/decidim/dev/test/rspec_support/controller_example_group.rb
decidim-dev-0.27.8 lib/decidim/dev/test/rspec_support/controller_example_group.rb
decidim-dev-0.29.0.rc4 lib/decidim/dev/test/rspec_support/controller_example_group.rb
decidim-dev-0.29.0.rc3 lib/decidim/dev/test/rspec_support/controller_example_group.rb
decidim-dev-0.29.0.rc2 lib/decidim/dev/test/rspec_support/controller_example_group.rb
decidim-dev-0.29.0.rc1 lib/decidim/dev/test/rspec_support/controller_example_group.rb
decidim-dev-0.28.2 lib/decidim/dev/test/rspec_support/controller_example_group.rb
decidim-dev-0.27.7 lib/decidim/dev/test/rspec_support/controller_example_group.rb
decidim-dev-0.28.1 lib/decidim/dev/test/rspec_support/controller_example_group.rb
decidim-dev-0.27.6 lib/decidim/dev/test/rspec_support/controller_example_group.rb
decidim-dev-0.28.0 lib/decidim/dev/test/rspec_support/controller_example_group.rb
decidim-dev-0.27.5 lib/decidim/dev/test/rspec_support/controller_example_group.rb
decidim-dev-0.28.0.rc5 lib/decidim/dev/test/rspec_support/controller_example_group.rb
decidim-dev-0.28.0.rc4 lib/decidim/dev/test/rspec_support/controller_example_group.rb
decidim-dev-0.27.4 lib/decidim/dev/test/rspec_support/controller_example_group.rb
decidim-dev-0.27.3 lib/decidim/dev/test/rspec_support/controller_example_group.rb