@@ -10,7 +10,7 @@ module MemoizedHelpers
10
10
# @note `subject` was contributed by Joe Ferris to support the one-liner
11
11
# syntax embraced by shoulda matchers:
12
12
#
13
- # describe Widget do
13
+ # RSpec. describe Widget do
14
14
# it { is_expected.to validate_presence_of(:name) }
15
15
# # or
16
16
# it { should validate_presence_of(:name) }
@@ -23,7 +23,7 @@ module MemoizedHelpers
23
23
# @example
24
24
#
25
25
# # Explicit declaration of subject.
26
- # describe Person do
26
+ # RSpec. describe Person do
27
27
# subject { Person.new(:birthdate => 19.years.ago) }
28
28
# it "should be eligible to vote" do
29
29
# subject.should be_eligible_to_vote
@@ -32,15 +32,15 @@ module MemoizedHelpers
32
32
# end
33
33
#
34
34
# # Implicit subject => { Person.new }.
35
- # describe Person do
35
+ # RSpec. describe Person do
36
36
# it "should be eligible to vote" do
37
37
# subject.should be_eligible_to_vote
38
38
# # ^ ^ explicit reference to subject not recommended
39
39
# end
40
40
# end
41
41
#
42
42
# # One-liner syntax - expectation is set on the subject.
43
- # describe Person do
43
+ # RSpec. describe Person do
44
44
# it { is_expected.to be_eligible_to_vote }
45
45
# # or
46
46
# it { should be_eligible_to_vote }
@@ -67,7 +67,7 @@ def subject
67
67
#
68
68
# @example
69
69
#
70
- # describe Person do
70
+ # RSpec. describe Person do
71
71
# it { should be_eligible_to_vote }
72
72
# end
73
73
#
@@ -86,7 +86,7 @@ def should(matcher=nil, message=nil)
86
86
#
87
87
# @example
88
88
#
89
- # describe Person do
89
+ # RSpec. describe Person do
90
90
# it { should_not be_eligible_to_vote }
91
91
# end
92
92
#
@@ -270,7 +270,7 @@ module ClassMethods
270
270
#
271
271
# @example
272
272
#
273
- # describe Thing do
273
+ # RSpec. describe Thing do
274
274
# let(:thing) { Thing.new }
275
275
#
276
276
# it "does something" do
@@ -323,7 +323,7 @@ def let(name, &block)
323
323
# end
324
324
# end
325
325
#
326
- # describe Thing do
326
+ # RSpec. describe Thing do
327
327
# after(:example) { Thing.reset_count }
328
328
#
329
329
# context "using let" do
@@ -379,13 +379,13 @@ def let!(name, &block)
379
379
#
380
380
# @example
381
381
#
382
- # describe CheckingAccount, "with $50" do
382
+ # RSpec. describe CheckingAccount, "with $50" do
383
383
# subject { CheckingAccount.new(Money.new(50, :USD)) }
384
384
# it { is_expected.to have_a_balance_of(Money.new(50, :USD)) }
385
385
# it { is_expected.not_to be_overdrawn }
386
386
# end
387
387
#
388
- # describe CheckingAccount, "with a non-zero starting balance" do
388
+ # RSpec. describe CheckingAccount, "with a non-zero starting balance" do
389
389
# subject(:account) { CheckingAccount.new(Money.new(50, :USD)) }
390
390
# it { is_expected.not_to be_overdrawn }
391
391
# it "has a balance equal to the starting balance" do
@@ -433,7 +433,7 @@ def subject(name=nil, &block)
433
433
# end
434
434
# end
435
435
#
436
- # describe Thing do
436
+ # RSpec. describe Thing do
437
437
# after(:example) { Thing.reset_count }
438
438
#
439
439
# context "using subject" do
0 commit comments