Sha256: 4ded45ffd9f1b70795e01e4fa690672fede29fd7d7ff56b4e45501f3b839499d

Contents?: true

Size: 410 Bytes

Versions: 4

Compression:

Stored size: 410 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

4 entries across 4 versions & 1 rubygems

Version Path
mtwarden-3.6.1 lib/mtwarden/testing_support/subdomain_helpers.rb
mtwarden-3.6.0 lib/mtwarden/testing_support/subdomain_helpers.rb
mtwarden-3.5.1 lib/mtwarden/testing_support/subdomain_helpers.rb
mtwarden-3.5.0 lib/mtwarden/testing_support/subdomain_helpers.rb