Sha256: 9c39089f467b6d37d710fe8e590db718c13fd3ba0b2b8306b698a797df5e3967

Contents?: true

Size: 366 Bytes

Versions: 5

Compression:

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

5 entries across 5 versions & 1 rubygems

Version Path
mtwarden-2.2.7 lib/mtwarden/testing_support/subdomain_helpers.rb
mtwarden-2.2.6 lib/mtwarden/testing_support/subdomain_helpers.rb
mtwarden-2.2.5 lib/mtwarden/testing_support/subdomain_helpers.rb
mtwarden-2.2.0 lib/mtwarden/testing_support/subdomain_helpers.rb
mtwarden-2.1.0 lib/mtwarden/testing_support/subdomain_helpers.rb