Skip to content

Commit ba6c2c6

Browse files
committed
Merge pull request #54 from vakuum/pr-1
Added some missing "do" keywords.
2 parents bd69f42 + e070f5a commit ba6c2c6

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,12 +1024,12 @@ they will retry the match for given timeout allowing you to test ajax actions.
10241024
end
10251025
10261026
# the spec...
1027-
describe Article
1028-
describe '#summary'
1027+
describe Article do
1028+
describe '#summary' do
10291029
#...
10301030
end
10311031

1032-
describe '.latest'
1032+
describe '.latest' do
10331033
#...
10341034
end
10351035
end
@@ -1229,7 +1229,7 @@ they will retry the match for given timeout allowing you to test ajax actions.
12291229
12301230
# spec/views/articles/show.html.haml_spec.rb
12311231
describe 'articles/show.html.haml' do
1232-
it 'displays the formatted date of article publishing'
1232+
it 'displays the formatted date of article publishing' do
12331233
article = mock_model(Article, published_at: Date.new(2012, 01, 01))
12341234
assign(:article, article)
12351235
@@ -1344,15 +1344,15 @@ they will retry the match for given timeout allowing you to test ajax actions.
13441344
* Create the model for all examples in the spec to avoid duplication.
13451345

13461346
```Ruby
1347-
describe Article
1347+
describe Article do
13481348
let(:article) { Fabricate(:article) }
13491349
end
13501350
```
13511351

13521352
* Add an example ensuring that the fabricated model is valid.
13531353

13541354
```Ruby
1355-
describe Article
1355+
describe Article do
13561356
it 'is valid with valid attributes' do
13571357
article.should be_valid
13581358
end
@@ -1365,15 +1365,15 @@ which should be validated. Using `be_valid` does not guarantee that the problem
13651365

13661366
```Ruby
13671367
# bad
1368-
describe '#title'
1368+
describe '#title' do
13691369
it 'is required' do
13701370
article.title = nil
13711371
article.should_not be_valid
13721372
end
13731373
end
13741374
13751375
# prefered
1376-
describe '#title'
1376+
describe '#title' do
13771377
it 'is required' do
13781378
article.title = nil
13791379
article.should have(1).error_on(:title)
@@ -1384,8 +1384,8 @@ which should be validated. Using `be_valid` does not guarantee that the problem
13841384
* Add a separate `describe` for each attribute which has validations.
13851385

13861386
```Ruby
1387-
describe Article
1388-
describe '#title'
1387+
describe Article do
1388+
describe '#title' do
13891389
it 'is required' do
13901390
article.title = nil
13911391
article.should have(1).error_on(:title)
@@ -1397,8 +1397,8 @@ which should be validated. Using `be_valid` does not guarantee that the problem
13971397
* When testing uniqueness of a model attribute, name the other object `another_object`.
13981398

13991399
```Ruby
1400-
describe Article
1401-
describe '#title'
1400+
describe Article do
1401+
describe '#title' do
14021402
it 'is unique' do
14031403
another_article = Fabricate.build(:article, title: article.title)
14041404
article.should have(1).error_on(:title)
@@ -1417,10 +1417,10 @@ which should be validated. Using `be_valid` does not guarantee that the problem
14171417
* the e-mail contains the required information
14181418

14191419
```Ruby
1420-
describe SubscriberMailer
1420+
describe SubscriberMailer do
14211421
let(:subscriber) { mock_model(Subscription, email: 'johndoe@test.com', name: 'John Doe') }
14221422
1423-
describe 'successful registration email'
1423+
describe 'successful registration email' do
14241424
subject { SubscriptionMailer.successful_registration_email(subscriber) }
14251425
14261426
its(:subject) { should == 'Successful Registration!' }

0 commit comments

Comments
 (0)