Logo: Relish

  1. Sign in

Project: RSpec Rails 2.99

Directory Structure

Scenarios
Specs in the `spec/controllers` directory automatically tagged as controller specs
Given
a file named "spec/controllers/widgets_controller_spec.rb" with:
require "spec_helper"

describe WidgetsController do
  it "responds successfully" do
    get :index
    expect(response.status).to eq(200)
  end
end
When
I run rspec spec
Then
the example should pass
And
the output should not contain:
rspec-rails 3 will no longer automatically infer an example group's spec type
Inferring spec type from directories is deprecated
Given
a file named "spec/controllers/widgets_controller_spec.rb" with:
require File.expand_path("../../../config/environment", __FILE__)
require 'rspec/rails'

describe WidgetsController do
  it "responds successfully" do
    get :index
    expect(response.status).to eq(200)
  end
end
When
I run rspec spec
Then
the example should pass
And
the output should contain:
rspec-rails 3 will no longer automatically infer an example group's spec type

Last published almost 4 years ago by myronmarston.