Skip to content

Commit 78b151a

Browse files
author
vanstee
committed
Identify ruby code for syntax highlighting
Fixes #617
1 parent 1dd534b commit 78b151a

22 files changed

+73
-73
lines changed

features/controller_specs/anonymous_controller.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Feature: anonymous controller
2121

2222
Scenario: specify error handling in ApplicationController
2323
Given a file named "spec/controllers/application_controller_spec.rb" with:
24-
"""
24+
"""ruby
2525
require "spec_helper"
2626
2727
class ApplicationController < ActionController::Base
@@ -56,7 +56,7 @@ Feature: anonymous controller
5656

5757
Scenario: specify error handling in subclass of ApplicationController
5858
Given a file named "spec/controllers/application_controller_subclass_spec.rb" with:
59-
"""
59+
"""ruby
6060
require "spec_helper"
6161
6262
class ApplicationController < ActionController::Base
@@ -94,7 +94,7 @@ Feature: anonymous controller
9494

9595
Scenario: infer base class from the described class
9696
Given a file named "spec/controllers/base_class_can_be_inferred_spec.rb" with:
97-
"""
97+
"""ruby
9898
require "spec_helper"
9999
100100
RSpec.configure do |c|
@@ -122,7 +122,7 @@ Feature: anonymous controller
122122

123123
Scenario: invoke around filter in base class
124124
Given a file named "spec/controllers/application_controller_around_filter_spec.rb" with:
125-
"""
125+
"""ruby
126126
require "spec_helper"
127127
128128
class ApplicationController < ActionController::Base
@@ -153,7 +153,7 @@ Feature: anonymous controller
153153

154154
Scenario: anonymous controllers only create resource routes
155155
Given a file named "spec/controllers/application_controller_spec.rb" with:
156-
"""
156+
"""ruby
157157
require "spec_helper"
158158
159159
describe ApplicationController do

features/controller_specs/bypass_rescue.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Feature: bypass rescue
99

1010
Background:
1111
Given a file named "spec/controllers/gadgets_controller_spec_context.rb" with:
12-
"""
12+
"""ruby
1313
class AccessDenied < StandardError; end
1414
1515
class ApplicationController < ActionController::Base
@@ -25,7 +25,7 @@ Feature: bypass rescue
2525

2626
Scenario: standard exception handling using `rescue_from`
2727
Given a file named "spec/controllers/gadgets_controller_spec.rb" with:
28-
"""
28+
"""ruby
2929
require "spec_helper"
3030
3131
require 'controllers/gadgets_controller_spec_context'
@@ -50,7 +50,7 @@ Feature: bypass rescue
5050

5151
Scenario: bypass `rescue_from` handling with `bypass_rescue`
5252
Given a file named "spec/controllers/gadgets_controller_spec.rb" with:
53-
"""
53+
"""ruby
5454
require "spec_helper"
5555
5656
require 'controllers/gadgets_controller_spec_context'

features/controller_specs/controller_spec.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Feature: controller spec
22

33
Scenario: simple passing example
44
Given a file named "spec/controllers/widgets_controller_spec.rb" with:
5-
"""
5+
"""ruby
66
require "spec_helper"
77
88
describe WidgetsController do
@@ -19,7 +19,7 @@ Feature: controller spec
1919

2020
Scenario: controller is exposed to global before hooks
2121
Given a file named "spec/controllers/widgets_controller_spec.rb" with:
22-
"""
22+
"""ruby
2323
require "spec_helper"
2424
2525
RSpec.configure {|c| c.before { expect(controller).not_to be_nil }}

features/controller_specs/isolation_from_views.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Feature: views are stubbed by default
99

1010
Scenario: expect template that is rendered by controller action (passes)
1111
Given a file named "spec/controllers/widgets_controller_spec.rb" with:
12-
"""
12+
"""ruby
1313
require "spec_helper"
1414
1515
describe WidgetsController do
@@ -32,7 +32,7 @@ Feature: views are stubbed by default
3232

3333
Scenario: expect template that is not rendered by controller action (fails)
3434
Given a file named "spec/controllers/widgets_controller_spec.rb" with:
35-
"""
35+
"""ruby
3636
require "spec_helper"
3737
3838
describe WidgetsController do
@@ -49,7 +49,7 @@ Feature: views are stubbed by default
4949

5050
Scenario: expect empty templates to render when view path is changed at runtime (passes)
5151
Given a file named "spec/controllers/things_controller_spec.rb" with:
52-
"""
52+
"""ruby
5353
require "spec_helper"
5454
5555
describe ThingsController do
@@ -69,7 +69,7 @@ Feature: views are stubbed by default
6969

7070
Scenario: expect template to render the real template with render_views when view path is changed at runtime
7171
Given a file named "spec/controllers/things_controller_spec.rb" with:
72-
"""
72+
"""ruby
7373
require "spec_helper"
7474
7575
describe ThingsController do

features/controller_specs/render_views.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Feature: render_views
55

66
Scenario: render_views directly in a single group
77
Given a file named "spec/controllers/widgets_controller_spec.rb" with:
8-
"""
8+
"""ruby
99
require "spec_helper"
1010
1111
describe WidgetsController do
@@ -24,7 +24,7 @@ Feature: render_views
2424

2525
Scenario: render_views on and off in nested groups
2626
Given a file named "spec/controllers/widgets_controller_spec.rb" with:
27-
"""
27+
"""ruby
2828
require "spec_helper"
2929
3030
describe WidgetsController do
@@ -73,7 +73,7 @@ Feature: render_views
7373
"""
7474
When I run `rspec spec --order default --format documentation`
7575
Then the output should contain:
76-
"""
76+
"""ruby
7777
WidgetsController
7878
with render_views
7979
GET index
@@ -91,13 +91,13 @@ Feature: render_views
9191

9292
Scenario: render_views globally
9393
Given a file named "spec/support/render_views.rb" with:
94-
"""
94+
"""ruby
9595
RSpec.configure do |config|
9696
config.render_views
9797
end
9898
"""
9999
And a file named "spec/controllers/widgets_controller_spec.rb" with:
100-
"""
100+
"""ruby
101101
require "spec_helper"
102102
103103
describe WidgetsController do

features/helper_specs/helper_spec.feature

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Feature: helper spec
1515

1616
Scenario: helper method that returns a value
1717
Given a file named "spec/helpers/application_helper_spec.rb" with:
18-
"""
18+
"""ruby
1919
require "spec_helper"
2020
2121
describe ApplicationHelper do
@@ -27,7 +27,7 @@ Feature: helper spec
2727
end
2828
"""
2929
And a file named "app/helpers/application_helper.rb" with:
30-
"""
30+
"""ruby
3131
module ApplicationHelper
3232
def page_title
3333
"RSpec is your friend"
@@ -39,7 +39,7 @@ Feature: helper spec
3939

4040
Scenario: helper method that accesses an instance variable
4141
Given a file named "spec/helpers/application_helper_spec.rb" with:
42-
"""
42+
"""ruby
4343
require "spec_helper"
4444
4545
describe ApplicationHelper do
@@ -52,7 +52,7 @@ Feature: helper spec
5252
end
5353
"""
5454
And a file named "app/helpers/application_helper.rb" with:
55-
"""
55+
"""ruby
5656
module ApplicationHelper
5757
def page_title
5858
@title || nil
@@ -64,7 +64,7 @@ Feature: helper spec
6464

6565
Scenario: application helper is included in helper object
6666
Given a file named "spec/helpers/widgets_helper_spec.rb" with:
67-
"""
67+
"""ruby
6868
require "spec_helper"
6969
7070
describe WidgetsHelper do
@@ -77,15 +77,15 @@ Feature: helper spec
7777
end
7878
"""
7979
And a file named "app/helpers/application_helper.rb" with:
80-
"""
80+
"""ruby
8181
module ApplicationHelper
8282
def app_name
8383
"The App"
8484
end
8585
end
8686
"""
8787
And a file named "app/helpers/widgets_helper.rb" with:
88-
"""
88+
"""ruby
8989
module WidgetsHelper
9090
def widget_title
9191
"#{app_name}: #{@title}"

features/mailer_specs/url_helpers.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ Feature: URL helpers in mailer examples
22

33
Scenario: using URL helpers with default options
44
Given a file named "config/initializers/mailer_defaults.rb" with:
5-
"""
5+
"""ruby
66
Rails.configuration.action_mailer.default_url_options = { :host => 'example.com' }
77
"""
88
And a file named "spec/mailers/notifications_spec.rb" with:
9-
"""
9+
"""ruby
1010
require 'spec_helper'
1111
1212
describe Notifications do
@@ -20,11 +20,11 @@ Feature: URL helpers in mailer examples
2020

2121
Scenario: using URL helpers without default options
2222
Given a file named "config/initializers/mailer_defaults.rb" with:
23-
"""
23+
"""ruby
2424
# no default options
2525
"""
2626
And a file named "spec/mailers/notifications_spec.rb" with:
27-
"""
27+
"""ruby
2828
require 'spec_helper'
2929
3030
describe Notifications do

features/matchers/new_record_matcher.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Feature: be_a_new matcher
88

99
Scenario: example spec with four be_a_new possibilities
1010
Given a file named "spec/models/widget_spec.rb" with:
11-
"""
11+
"""ruby
1212
require "spec_helper"
1313
1414
describe Widget do

features/matchers/redirect_to_matcher.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Feature: redirect_to matcher
99

1010
Scenario: redirect_to with four possible options
1111
Given a file named "spec/controllers/widgets_controller_spec.rb" with:
12-
"""
12+
"""ruby
1313
require "spec_helper"
1414
1515
describe WidgetsController do

features/matchers/relation_match_array.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Feature: ActiveRecord::Relation match array
66

77
Scenario: example spec with relation match_array matcher
88
Given a file named "spec/models/widget_spec.rb" with:
9-
"""
9+
"""ruby
1010
require "spec_helper"
1111
1212
describe Widget do

0 commit comments

Comments
 (0)