Sha256: fdf6952311442816f4d787303b02dc666d8fc0c764ef5dd168dcd8e9af187cc8

Contents?: true

Size: 503 Bytes

Versions: 5

Compression:

Stored size: 503 Bytes

Contents

module Cadenero
  # Helper Methods for testing
  module TestingSupport
    # RSpec Helper for subdomains
    module SubdomainHelpers
      # To be use for RSpec features for defining and account with a subdomain visible for Capybara
      def within_account_subdomain
        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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cadenero-0.0.2.b10 lib/cadenero/testing_support/subdomain_helpers.rb
cadenero-0.0.2.b8 lib/cadenero/testing_support/subdomain_helpers.rb
cadenero-0.0.2.b7 lib/cadenero/testing_support/subdomain_helpers.rb
cadenero-0.0.2.b6 lib/cadenero/testing_support/subdomain_helpers.rb
cadenero-0.0.2.b5 lib/cadenero/testing_support/subdomain_helpers.rb