Sha256: f5028ade22932b7f80b764217778828d49085e6de5e96c47471a878f009ef371

Contents?: true

Size: 409 Bytes

Versions: 25

Compression:

Stored size: 409 Bytes

Contents

module Mtwarden
  module TestingSupport
    module SubdomainHelpers

      def within_account_subdomain(&block)
        context "within a subdomain" do
          let(:subdomain_url) { "http://#{account.subdomain}.example.com" }
          before { Capybara.default_host = subdomain_url }
          after { Capybara.default_host = "http://example.com" }
          yield
        end
      end

    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
mtwarden-6.1.2 lib/mtwarden/testing_support/subdomain_helpers.rb
mtwarden-6.1.1 lib/mtwarden/testing_support/subdomain_helpers.rb
mtwarden-6.1.0 lib/mtwarden/testing_support/subdomain_helpers.rb
mtwarden-6.0.0 lib/mtwarden/testing_support/subdomain_helpers.rb
mtwarden-5.0.0 lib/mtwarden/testing_support/subdomain_helpers.rb