Sha256: c84d9838b36bffbe014b2a7c635f40f0b41f1a096c912348582767341ae804ae

Contents?: true

Size: 925 Bytes

Versions: 18

Compression:

Stored size: 925 Bytes

Contents

require 'ruby_spec_helpers/site_prism_dropdown'

class SitePrism::Page
  include SitePrismDropdown
end

class SitePrism::Section
  include SitePrismDropdown
end

Dir[Rails.root.join("spec/support/*.rb")].each { |f| require f }
Dir[Rails.root.join("spec/support/sections/**/*.rb")].each { |f| require f }
Dir[Rails.root.join("spec/support/pages/**/*.rb")].each { |f| require f }
Rails.application.config.autoload_paths += Dir[Rails.root.join("spec/support/**/")]

SitePrism.configure do |config|
  config.use_implicit_waits = true
end

class SitePrismApp
  def initialize
    @pages = {}
  end

  def method_missing(name, *args, &block)
    @pages[name.to_s] ||= Object.const_get(name.to_s.camelize).new
  end

  def reload(page)
    @pages[page.to_s] = nil
  end
end

module SitePrismHelpers
  def app
    @app ||= SitePrismApp.new
  end
end

RSpec.configure do |config|
  config.include SitePrismHelpers, type: :feature
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
test_track_rails_client-2.0.0 vendor/gems/ruby_spec_helpers/lib/ruby_spec_helpers/site_prism_configuration.rb
test_track_rails_client-1.3.0 vendor/gems/ruby_spec_helpers/lib/ruby_spec_helpers/site_prism_configuration.rb
test_track_rails_client-1.2.0 vendor/gems/ruby_spec_helpers/lib/ruby_spec_helpers/site_prism_configuration.rb
test_track_rails_client-1.1.0 vendor/gems/ruby_spec_helpers/lib/ruby_spec_helpers/site_prism_configuration.rb
test_track_rails_client-1.0.0 vendor/gems/ruby_spec_helpers/lib/ruby_spec_helpers/site_prism_configuration.rb
test_track_rails_client-0.9.20 vendor/gems/ruby_spec_helpers/lib/ruby_spec_helpers/site_prism_configuration.rb
test_track_rails_client-0.9.19 vendor/gems/ruby_spec_helpers/lib/ruby_spec_helpers/site_prism_configuration.rb
test_track_rails_client-0.9.18 vendor/gems/ruby_spec_helpers/lib/ruby_spec_helpers/site_prism_configuration.rb
test_track_rails_client-0.9.17 vendor/gems/ruby_spec_helpers/lib/ruby_spec_helpers/site_prism_configuration.rb
test_track_rails_client-0.9.16 vendor/gems/ruby_spec_helpers/lib/ruby_spec_helpers/site_prism_configuration.rb
test_track_rails_client-0.9.15 vendor/gems/ruby_spec_helpers/lib/ruby_spec_helpers/site_prism_configuration.rb
test_track_rails_client-0.9.14 vendor/gems/ruby_spec_helpers/lib/ruby_spec_helpers/site_prism_configuration.rb
test_track_rails_client-0.9.13 vendor/gems/ruby_spec_helpers/lib/ruby_spec_helpers/site_prism_configuration.rb
test_track_rails_client-0.9.12 vendor/gems/ruby_spec_helpers/lib/ruby_spec_helpers/site_prism_configuration.rb
test_track_rails_client-0.9.11 vendor/gems/ruby_spec_helpers/lib/ruby_spec_helpers/site_prism_configuration.rb
test_track_rails_client-0.9.10 vendor/gems/ruby_spec_helpers/lib/ruby_spec_helpers/site_prism_configuration.rb
test_track_rails_client-0.9.9 vendor/gems/ruby_spec_helpers/lib/ruby_spec_helpers/site_prism_configuration.rb
test_track_rails_client-0.9.8 vendor/gems/ruby_spec_helpers/lib/ruby_spec_helpers/site_prism_configuration.rb