Skip to content

Commit

Permalink
Change @api tag rule descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
John Backus committed Oct 4, 2015
1 parent b81f43d commit 571e5cb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions lib/yardstick/rules/api_tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ApiTag
# Checks if @api tag is present
#
class Presence < Rule
self.description = 'The @api tag should be specified'
self.description = '@api should be specified'

# @see class description
#
Expand All @@ -26,7 +26,7 @@ def valid?
class Inclusion < Rule
VALID_VALUES = %w[public semipublic private].freeze

self.description = 'The @api tag must be either public, semipublic or private'
self.description = '@api should be public, semipublic, or private'

# @see class description
#
Expand All @@ -42,7 +42,7 @@ def valid?
# Checks if protected method has correct @api visibility
#
class ProtectedMethod < Rule
self.description = 'A method with protected visibility must have an @api tag of semipublic or private'
self.description = '@api should be semipublic or private for protected methods'

# @see Rule::validatable?
#
Expand All @@ -68,7 +68,7 @@ def valid?
# Checks if private method has correct @api visibility
#
class PrivateMethod < Rule
self.description = 'A method with private visibility must have an @api tag of private'
self.description = '@api should be private for private methods'

# @see Rule::validatable?
#
Expand Down
20 changes: 10 additions & 10 deletions spec/integration/yardstick/processor/process_string_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def test(value)
it { should be_kind_of(Yardstick::MeasurementSet) }

it 'has a correct measurement' do
expect(measurement('The @api tag should be specified'))
expect(measurement('@api should be specified'))
.to be_ok
end
end
Expand All @@ -232,7 +232,7 @@ def test(value)
it { should be_kind_of(Yardstick::MeasurementSet) }

it 'has an incorrect measurement' do
expect(measurement('The @api tag should be specified'))
expect(measurement('@api should be specified'))
.to_not be_ok
end
end
Expand All @@ -243,7 +243,7 @@ def test(value)
it { should be_kind_of(Yardstick::MeasurementSet) }

it 'has a correct measurement' do
expect(measurement('The @api tag must be either public, semipublic or private'))
expect(measurement('@api should be public, semipublic, or private'))
.to be_ok
end
end
Expand All @@ -260,7 +260,7 @@ def test(value)
it { should be_kind_of(Yardstick::MeasurementSet) }

it 'has an incorrect measurement' do
expect(measurement('The @api tag must be either public, semipublic or private'))
expect(measurement('@api should be public, semipublic, or private'))
.to_not be_ok
end
end
Expand All @@ -279,7 +279,7 @@ def test(value)
it { should be_kind_of(Yardstick::MeasurementSet) }

it 'has a correct measurement' do
expect(measurement('A method with protected visibility must have an @api tag of semipublic or private'))
expect(measurement('@api should be semipublic or private for protected methods'))
.to be_ok
end
end
Expand All @@ -298,7 +298,7 @@ def test(value)
it { should be_kind_of(Yardstick::MeasurementSet) }

it 'has a correct measurement' do
expect(measurement('A method with protected visibility must have an @api tag of semipublic or private'))
expect(measurement('@api should be semipublic or private for protected methods'))
.to be_ok
end
end
Expand All @@ -317,7 +317,7 @@ def test(value)
it { should be_kind_of(Yardstick::MeasurementSet) }

it 'has an incorrect measurement' do
expect(measurement('A method with protected visibility must have an @api tag of semipublic or private'))
expect(measurement('@api should be semipublic or private for protected methods'))
.to_not be_ok
end
end
Expand All @@ -336,7 +336,7 @@ def test(value)
it { should be_kind_of(Yardstick::MeasurementSet) }

it 'has a correct measurement' do
expect(measurement('A method with private visibility must have an @api tag of private'))
expect(measurement('@api should be private for private methods'))
.to be_ok
end
end
Expand All @@ -355,7 +355,7 @@ def test(value)
it { should be_kind_of(Yardstick::MeasurementSet) }

it 'has an incorrect measurement' do
expect(measurement('A method with private visibility must have an @api tag of private'))
expect(measurement('@api should be private for private methods'))
.to_not be_ok
end
end
Expand All @@ -374,7 +374,7 @@ def test(value)
it { should be_kind_of(Yardstick::MeasurementSet) }

it 'has an incorrect measurement' do
expect(measurement('A method with private visibility must have an @api tag of private'))
expect(measurement('@api should be private for private methods'))
.to_not be_ok
end
end
Expand Down

0 comments on commit 571e5cb

Please sign in to comment.