Sha256: 675257b77ce8c1048a6fe0eae4845c9eeb3ac105c862c264291e2b8ce00adf4f

Contents?: true

Size: 1.48 KB

Versions: 36

Compression:

Stored size: 1.48 KB

Contents

unless defined? TRUSTY_CMS_ROOT
  ENV["Rails.env"] = "test"
  case
  when ENV.fetch('RADIANT_ENV_FILE')
    require ENV.fetch('RADIANT_ENV_FILE')
  when File.dirname(__FILE__) =~ %r{vendor/trusty_cms/vendor/extensions}
    require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../../")}/config/environment"
  else
    require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../")}/config/environment"
  end
end
require "#{TRUSTY_CMS_ROOT}/spec/spec_helper"

Dataset::Resolver.default << (File.dirname(__FILE__) + "/datasets")
# Include any datasets from loaded extensions
TrustyCms::Extension.descendants.each do |extension|
  if File.directory?(extension.root + "/spec/datasets")
    Dataset::Resolver.default << (extension.root + "/spec/datasets")
  end
end

if File.directory?(File.dirname(__FILE__) + "/matchers")
  Dir[File.dirname(__FILE__) + "/matchers/*.rb"].each {|file| require file }
end

Spec::Runner.configure do |config|
  # config.use_transactional_fixtures = true
  # config.use_instantiated_fixtures  = false
  # config.fixture_path = Rails.root + '/spec/fixtures'

  # You can declare fixtures for each behaviour like this:
  #   describe "...." do
  #     fixtures :table_a, :table_b
  #
  # Alternatively, if you prefer to declare them only once, you can
  # do so here, like so ...
  #
  #   config.global_fixtures = :table_a, :table_b
  #
  # If you declare global fixtures, be aware that they will be declared
  # for all of your examples, even those that don't use them.
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
trusty-cms-6.3.1 lib/generators/extension/templates/spec_helper.rb
trusty-cms-7.0.2 lib/generators/extension/templates/spec_helper.rb
trusty-cms-7.0.1 lib/generators/extension/templates/spec_helper.rb
trusty-cms-7.0.0 lib/generators/extension/templates/spec_helper.rb
trusty-cms-6.3 lib/generators/extension/templates/spec_helper.rb
trusty-cms-6.2.1 lib/generators/extension/templates/spec_helper.rb
trusty-cms-6.2.2.1 lib/generators/extension/templates/spec_helper.rb
trusty-cms-6.2.0 lib/generators/extension/templates/spec_helper.rb
trusty-cms-6.1.2 lib/generators/extension/templates/spec_helper.rb
trusty-cms-6.1.1 lib/generators/extension/templates/spec_helper.rb
trusty-cms-6.0.5 lib/generators/extension/templates/spec_helper.rb
trusty-cms-6.0.4 lib/generators/extension/templates/spec_helper.rb
trusty-cms-6.0.3 lib/generators/extension/templates/spec_helper.rb
trusty-cms-6.0.2 lib/generators/extension/templates/spec_helper.rb
trusty-cms-6.0.1 lib/generators/extension/templates/spec_helper.rb
trusty-cms-5.6.1 lib/generators/extension/templates/spec_helper.rb
trusty-cms-6.0.0 lib/generators/extension/templates/spec_helper.rb
trusty-cms-5.6.0 lib/generators/extension/templates/spec_helper.rb
trusty-cms-5.5.9 lib/generators/extension/templates/spec_helper.rb
trusty-cms-5.5.8 lib/generators/extension/templates/spec_helper.rb