Skip to content

Commit 31fe4d0

Browse files
committed
manually tag type examples
1 parent 44c9334 commit 31fe4d0

14 files changed

+47
-47
lines changed

features/controller_specs/anonymous_controller.feature

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Feature: anonymous controller
2020
c.infer_base_class_for_anonymous_controllers = false
2121
end
2222

23-
RSpec.describe BaseController do
23+
RSpec.describe BaseController, :type => :controller do
2424
controller do
2525
def index; end
2626

@@ -48,7 +48,7 @@ Feature: anonymous controller
4848
end
4949
end
5050
51-
RSpec.describe ApplicationController do
51+
RSpec.describe ApplicationController, :type => :controller do
5252
controller do
5353
def index
5454
raise ApplicationController::AccessDenied
@@ -86,7 +86,7 @@ Feature: anonymous controller
8686
end
8787
end
8888
89-
RSpec.describe ApplicationControllerSubclass do
89+
RSpec.describe ApplicationControllerSubclass, :type => :controller do
9090
controller(ApplicationControllerSubclass) do
9191
def index
9292
raise ApplicationController::AccessDenied
@@ -113,7 +113,7 @@ Feature: anonymous controller
113113
114114
class ApplicationControllerSubclass < ApplicationController; end
115115
116-
RSpec.describe ApplicationControllerSubclass do
116+
RSpec.describe ApplicationControllerSubclass, :type => :controller do
117117
controller do
118118
def index
119119
render :text => "Hello World"
@@ -136,7 +136,7 @@ Feature: anonymous controller
136136
class ApplicationController < ActionController::Base; end
137137
class FoosController < ApplicationController; end
138138
139-
RSpec.describe "FoosController controller_name" do
139+
RSpec.describe "FoosController controller_name", :type => :controller do
140140
controller FoosController do
141141
def index
142142
@name = self.class.name
@@ -175,7 +175,7 @@ Feature: anonymous controller
175175
end
176176
end
177177
178-
RSpec.describe ApplicationController do
178+
RSpec.describe ApplicationController, :type => :controller do
179179
controller do
180180
def index
181181
render :nothing => true
@@ -197,7 +197,7 @@ Feature: anonymous controller
197197
"""ruby
198198
require "rails_helper"
199199
200-
RSpec.describe ApplicationController do
200+
RSpec.describe ApplicationController, :type => :controller do
201201
controller do
202202
def index
203203
render :text => "index called"
@@ -375,7 +375,7 @@ Feature: anonymous controller
375375
"""ruby
376376
require "rails_helper"
377377
378-
RSpec.describe ApplicationController do
378+
RSpec.describe ApplicationController, :type => :controller do
379379
controller do
380380
def custom
381381
render :text => "custom called"
@@ -400,7 +400,7 @@ Feature: anonymous controller
400400
401401
class FoosController < ApplicationController; end
402402
403-
RSpec.describe ApplicationController do
403+
RSpec.describe ApplicationController, :type => :controller do
404404
controller FoosController do
405405
def custom
406406
render :text => "custom called"
@@ -430,7 +430,7 @@ Feature: anonymous controller
430430
end
431431
end
432432
433-
RSpec.describe TopLevel::InnerSpace::FoosController do
433+
RSpec.describe TopLevel::InnerSpace::FoosController, :type => :controller do
434434
controller do
435435
def index
436436
@name = self.class.name
@@ -466,7 +466,7 @@ Feature: anonymous controller
466466
match "/login" => "sessions#new", :as => "login", :via => "get"
467467
end
468468
469-
RSpec.describe ApplicationController do
469+
RSpec.describe ApplicationController, :type => :controller do
470470
controller do
471471
def index
472472
redirect_to login_url

features/controller_specs/bypass_rescue.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Feature: bypass rescue
3030
3131
require 'controllers/gadgets_controller_spec_context'
3232
33-
RSpec.describe GadgetsController do
33+
RSpec.describe GadgetsController, :type => :controller do
3434
before do
3535
def controller.index
3636
raise AccessDenied
@@ -55,7 +55,7 @@ Feature: bypass rescue
5555
5656
require 'controllers/gadgets_controller_spec_context'
5757
58-
RSpec.describe GadgetsController do
58+
RSpec.describe GadgetsController, :type => :controller do
5959
before do
6060
def controller.index
6161
raise AccessDenied

features/controller_specs/controller_spec.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Feature: controller spec
55
"""ruby
66
require "rails_helper"
77
8-
RSpec.describe WidgetsController do
8+
RSpec.describe WidgetsController, :type => :controller do
99
describe "GET index" do
1010
it "has a 200 status code" do
1111
get :index
@@ -24,7 +24,7 @@ Feature: controller spec
2424
2525
RSpec.configure {|c| c.before { expect(controller).not_to be_nil }}
2626
27-
RSpec.describe WidgetsController do
27+
RSpec.describe WidgetsController, :type => :controller do
2828
describe "GET index" do
2929
it "doesn't matter" do
3030
end
@@ -46,7 +46,7 @@ Feature: controller spec
4646
4747
RSpec.configure {|c| c.include MyHelper }
4848
49-
RSpec.describe WidgetsController do
49+
RSpec.describe WidgetsController, :type => :controller do
5050
let(:my_variable) { 'is a value' }
5151
5252
describe 'something' do

features/controller_specs/engine_routes.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Feature: engine routes for controllers
3434
end
3535
end
3636
37-
RSpec.describe MyEngine::WidgetsController do
37+
RSpec.describe MyEngine::WidgetsController, :type => :controller do
3838
routes { MyEngine::Engine.routes }
3939
4040
it "redirects to a random widget" do

features/controller_specs/isolation_from_views.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Feature: views are stubbed by default
1212
"""ruby
1313
require "rails_helper"
1414
15-
RSpec.describe WidgetsController do
15+
RSpec.describe WidgetsController, :type => :controller do
1616
describe "index" do
1717
it "renders the index template" do
1818
get :index
@@ -35,7 +35,7 @@ Feature: views are stubbed by default
3535
"""ruby
3636
require "rails_helper"
3737
38-
RSpec.describe WidgetsController do
38+
RSpec.describe WidgetsController, :type => :controller do
3939
describe "index" do
4040
it "renders the 'new' template" do
4141
get :index
@@ -52,7 +52,7 @@ Feature: views are stubbed by default
5252
"""ruby
5353
require "rails_helper"
5454
55-
RSpec.describe ThingsController do
55+
RSpec.describe ThingsController, :type => :controller do
5656
describe "custom_action" do
5757
it "renders an empty custom_action template" do
5858
controller.prepend_view_path 'app/views'
@@ -72,7 +72,7 @@ Feature: views are stubbed by default
7272
"""ruby
7373
require "rails_helper"
7474
75-
RSpec.describe ThingsController do
75+
RSpec.describe ThingsController, :type => :controller do
7676
render_views
7777
7878
it "renders the real custom_action template" do

features/controller_specs/render_views.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Feature: render_views
88
"""ruby
99
require "rails_helper"
1010
11-
RSpec.describe WidgetsController do
11+
RSpec.describe WidgetsController, :type => :controller do
1212
render_views
1313
1414
describe "GET index" do
@@ -27,7 +27,7 @@ Feature: render_views
2727
"""ruby
2828
require "rails_helper"
2929
30-
RSpec.describe WidgetsController do
30+
RSpec.describe WidgetsController, :type => :controller do
3131
context "with render_views" do
3232
render_views
3333
@@ -101,7 +101,7 @@ Feature: render_views
101101
require "rails_helper"
102102
require "support/render_views"
103103
104-
RSpec.describe WidgetsController do
104+
RSpec.describe WidgetsController, :type => :controller do
105105
describe "GET index" do
106106
it "renders the index template" do
107107
get :index

features/helper_specs/helper_spec.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Feature: helper spec
1818
"""ruby
1919
require "rails_helper"
2020
21-
RSpec.describe ApplicationHelper do
21+
RSpec.describe ApplicationHelper, :type => :helper do
2222
describe "#page_title" do
2323
it "returns the default title" do
2424
expect(helper.page_title).to eq("RSpec is your friend")
@@ -42,7 +42,7 @@ Feature: helper spec
4242
"""ruby
4343
require "rails_helper"
4444
45-
RSpec.describe ApplicationHelper do
45+
RSpec.describe ApplicationHelper, :type => :helper do
4646
describe "#page_title" do
4747
it "returns the instance variable" do
4848
assign(:title, "My Title")
@@ -67,7 +67,7 @@ Feature: helper spec
6767
"""ruby
6868
require "rails_helper"
6969
70-
RSpec.describe WidgetsHelper do
70+
RSpec.describe WidgetsHelper, :type => :helper do
7171
describe "#widget_title" do
7272
it "includes the app name" do
7373
assign(:title, "This Widget")
@@ -100,7 +100,7 @@ Feature: helper spec
100100
"""ruby
101101
require "rails_helper"
102102
103-
RSpec.describe WidgetsHelper do
103+
RSpec.describe WidgetsHelper, :type => :helper do
104104
describe "#link_to_widget" do
105105
it "links to a widget using its name" do
106106
widget = Widget.create!(:name => "This Widget")

features/mailer_specs/url_helpers.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Feature: URL helpers in mailer examples
99
"""ruby
1010
require 'rails_helper'
1111
12-
RSpec.describe Notifications do
12+
RSpec.describe Notifications, :type => :mailer do
1313
it 'should have access to URL helpers' do
1414
expect { gadgets_url }.not_to raise_error
1515
end
@@ -27,7 +27,7 @@ Feature: URL helpers in mailer examples
2727
"""ruby
2828
require 'rails_helper'
2929
30-
RSpec.describe Notifications do
30+
RSpec.describe Notifications, :type => :mailer do
3131
it 'should have access to URL helpers' do
3232
expect { gadgets_url :host => 'example.com' }.not_to raise_error
3333
expect { gadgets_url }.to raise_error

features/model_specs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ behavior and expectations.
99

1010
require "rails_helper"
1111

12-
RSpec.describe Post do
12+
RSpec.describe Post, :type => :model do
1313
context "with 2 or more comments" do
1414
it "orders them in reverse chronologically" do
1515
post = Post.create!

features/model_specs/transactional_examples.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Feature: transactional examples
1010
"""ruby
1111
require "rails_helper"
1212
13-
RSpec.describe Widget do
13+
RSpec.describe Widget, :type => :model do
1414
it "has none to begin with" do
1515
expect(Widget.count).to eq 0
1616
end
@@ -37,7 +37,7 @@ Feature: transactional examples
3737
c.use_transactional_examples = true
3838
end
3939
40-
RSpec.describe Widget do
40+
RSpec.describe Widget, :type => :model do
4141
it "has none to begin with" do
4242
expect(Widget.count).to eq 0
4343
end
@@ -65,7 +65,7 @@ Feature: transactional examples
6565
c.order = "defined"
6666
end
6767
68-
RSpec.describe Widget do
68+
RSpec.describe Widget, :type => :model do
6969
it "has none to begin with" do
7070
expect(Widget.count).to eq 0
7171
end
@@ -90,7 +90,7 @@ Feature: transactional examples
9090
"""ruby
9191
require "rails_helper"
9292
93-
RSpec.describe Thing do
93+
RSpec.describe Thing, :type => :model do
9494
fixtures :things
9595
it "fixture method defined" do
9696
things(:one)

features/routing_specs/be_routable_matcher.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Feature: be_routable matcher
99
"""ruby
1010
require "rails_helper"
1111
12-
RSpec.describe "routes for Widgets" do
12+
RSpec.describe "routes for Widgets", :type => :routing do
1313
it "does not route to widgets" do
1414
expect(:get => "/widgets").not_to be_routable
1515
end
@@ -24,7 +24,7 @@ Feature: be_routable matcher
2424
"""ruby
2525
require "rails_helper"
2626
27-
RSpec.describe "routes for Widgets" do
27+
RSpec.describe "routes for Widgets", :type => :routing do
2828
it "does not route to widgets/foo/bar" do
2929
expect(:get => "/widgets/foo/bar").not_to be_routable
3030
end
@@ -39,7 +39,7 @@ Feature: be_routable matcher
3939
"""ruby
4040
require "rails_helper"
4141
42-
RSpec.describe "routes for Widgets" do
42+
RSpec.describe "routes for Widgets", :type => :routing do
4343
it "routes to /widgets" do
4444
expect(:get => "/widgets").to be_routable
4545
end
@@ -54,7 +54,7 @@ Feature: be_routable matcher
5454
"""ruby
5555
require "rails_helper"
5656
57-
RSpec.describe "routes for Widgets" do
57+
RSpec.describe "routes for Widgets", :type => :routing do
5858
it "routes to widgets/foo/bar" do
5959
expect(:get => "/widgets/foo/bar").to be_routable
6060
end
@@ -69,7 +69,7 @@ Feature: be_routable matcher
6969
"""ruby
7070
require "rails_helper"
7171
72-
RSpec.describe WidgetsController do
72+
RSpec.describe WidgetsController, :type => :routing do
7373
it "routes to /widgets" do
7474
expect(:get => "/widgets").to be_routable
7575
end

features/routing_specs/engine_routes.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Feature: engine routes
2525
end
2626
end
2727
28-
RSpec.describe MyEngine::WidgetsController do
28+
RSpec.describe MyEngine::WidgetsController, :type => :routing do
2929
routes { MyEngine::Engine.routes }
3030
3131
it "routes to the list of all widgets" do

features/routing_specs/named_routes.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Feature: named routes
77
"""ruby
88
require "rails_helper"
99
10-
RSpec.describe "routes to the widgets controller" do
10+
RSpec.describe "routes to the widgets controller", :type => :routing do
1111
it "routes a named route" do
1212
expect(:get => new_widget_path).
1313
to route_to(:controller => "widgets", :action => "new")

0 commit comments

Comments
 (0)