Sha256: 91743d5be63135622433b878caf34628f194c45b32b310c1151b462902088b94

Contents?: true

Size: 1.74 KB

Versions: 14

Compression:

Stored size: 1.74 KB

Contents

require 'rspec/rails/example/rails_example_group'
require 'rspec/rails/example/controller_example_group'
require 'rspec/rails/example/request_example_group'
require 'rspec/rails/example/helper_example_group'
require 'rspec/rails/example/view_example_group'
require 'rspec/rails/example/mailer_example_group'
require 'rspec/rails/example/routing_example_group'
require 'rspec/rails/example/model_example_group'
require 'rspec/rails/example/feature_example_group'

RSpec::configure do |c|
  def c.escaped_path(*parts)
    Regexp.compile(parts.join('[\\\/]') + '[\\\/]')
  end

  c.include RSpec::Rails::ControllerExampleGroup, :type => :controller, :example_group => {
    :file_path => c.escaped_path(%w[spec controllers])
  }
  c.include RSpec::Rails::HelperExampleGroup, :type => :helper, :example_group => {
    :file_path => c.escaped_path(%w[spec helpers])
  }
  if defined?(RSpec::Rails::MailerExampleGroup)
    c.include RSpec::Rails::MailerExampleGroup, :type => :mailer, :example_group => {
      :file_path => c.escaped_path(%w[spec mailers])
    }
  end
  c.include RSpec::Rails::ModelExampleGroup, :type => :model, :example_group => {
    :file_path => c.escaped_path(%w[spec models])
  }
  c.include RSpec::Rails::RequestExampleGroup, :type => :request, :example_group => {
    :file_path => c.escaped_path(%w[spec (requests|integration|api)])
  }
  c.include RSpec::Rails::RoutingExampleGroup, :type => :routing, :example_group => {
    :file_path => c.escaped_path(%w[spec routing])
  }
  c.include RSpec::Rails::ViewExampleGroup, :type => :view, :example_group => {
    :file_path => c.escaped_path(%w[spec views])
  }
  c.include RSpec::Rails::FeatureExampleGroup, :type => :feature, :example_group => {
    :file_path => c.escaped_path(%w[spec features])
  }
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-rails-2.13.0/lib/rspec/rails/example.rb
rspec-rails-2.99.0 lib/rspec/rails/example.rb
rspec-rails-2.99.0.rc1 lib/rspec/rails/example.rb
rspec-rails-2.14.2 lib/rspec/rails/example.rb
rspec-rails-2.99.0.beta2 lib/rspec/rails/example.rb
rspec-rails-2.14.1 lib/rspec/rails/example.rb
rspec-rails-2.99.0.beta1 lib/rspec/rails/example.rb
rspec-rails-2.14.0 lib/rspec/rails/example.rb
rspec-rails-2.14.0.rc1 lib/rspec/rails/example.rb
rspec-rails-2.13.2 lib/rspec/rails/example.rb
rspec-rails-2.13.1 lib/rspec/rails/example.rb
rspec-rails-2.13.0 lib/rspec/rails/example.rb
rspec-rails-2.12.2 lib/rspec/rails/example.rb
rspec-rails-2.12.1 lib/rspec/rails/example.rb