Skip to content

Commit

Permalink
Merge pull request #68 from nevir/release-1.4.0
Browse files Browse the repository at this point in the history
release 1.4.0
  • Loading branch information
nijikon committed Feb 15, 2016
2 parents cc45f55 + 1d788e5 commit 9aa33ee
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 16 deletions.
4 changes: 0 additions & 4 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@ Style/MultilineMethodCallIndentation:

Style/MultilineOperationIndentation:
EnforcedStyle: indented

# to be re-enabled once bbatsov/rubocop#2634 is merged
Style/MutableConstant:
Enabled: false
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## master (unreleased)

## 1.4.0 (15/02/2016)

* Update to rubocop 0.37.2. ([@nijikon][])
* Update ruby versions we test against. ([@nijikon][])
* Add `RSpec::NotToNot` cop. ([@miguelfteixeira][])
Expand Down
4 changes: 2 additions & 2 deletions lib/rubocop/cop/rspec/any_instance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ module RSpec
# end
# end
class AnyInstance < Cop
MESSAGE = 'Avoid stubbing using `%{method}`'
MESSAGE = 'Avoid stubbing using `%{method}`'.freeze

ANY_INSTANCE_METHODS = [
:any_instance,
:allow_any_instance_of,
:expect_any_instance_of
]
].freeze

def on_send(node)
_receiver, method_name, *_args = *node
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cop/rspec/describe_class.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class DescribeClass < Cop
FEATURE_PAIR = s(:pair, s(:sym, :type), s(:sym, :feature))

MESSAGE = 'The first argument to describe should be the class or ' \
'module being tested.'
'module being tested.'.freeze

def on_top_level_describe(_node, args)
return if args[0] && args[0].type == :const
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cop/rspec/describe_method.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DescribeMethod < Cop
include RuboCop::RSpec::TopLevelDescribe

MESSAGE = 'The second argument to describe should be the method ' \
"being tested. '#instance' or '.class'"
"being tested. '#instance' or '.class'".freeze
METHOD_STRING_MATCHER = /^[\#\.].+/

def on_top_level_describe(_node, args)
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cop/rspec/described_class.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module RSpec
class DescribedClass < Cop
include RuboCop::RSpec::TopLevelDescribe

MESSAGE = 'Use `described_class` instead of `%s`'
MESSAGE = 'Use `described_class` instead of `%s`'.freeze

def on_block(node)
method, _args, body = *node
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cop/rspec/example_wording.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module RSpec
# it 'finds nothing' do
# end
class ExampleWording < Cop
MSG = 'Do not use should when describing your tests.'
MSG = 'Do not use should when describing your tests.'.freeze

def on_block(node) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength,Metrics/LineLength
method, = *node
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cop/rspec/file_path.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module RSpec
class FilePath < Cop
include RuboCop::RSpec::TopLevelDescribe

MESSAGE = 'Spec path should end with `%s`'
MESSAGE = 'Spec path should end with `%s`'.freeze
METHOD_STRING_MATCHER = /^[\#\.].+/

def on_top_level_describe(node, args)
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cop/rspec/instance_variable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module RSpec
# it { expect(foo).to be_empty }
# end
class InstanceVariable < Cop
MESSAGE = 'Use `let` instead of an instance variable'
MESSAGE = 'Use `let` instead of an instance variable'.freeze
EXAMPLE_GROUP_METHODS = [
:example_group, :describe, :context, :xdescribe, :xcontext,
:fdescribe, :fcontext, :shared_examples, :shared_context,
Expand Down
5 changes: 3 additions & 2 deletions lib/rubocop/cop/rspec/multiple_describes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ module RSpec
class MultipleDescribes < Cop
include RuboCop::RSpec::TopLevelDescribe

MESSAGE = 'Do not use multiple top level describes - try to nest them.'
MSG = 'Do not use multiple top level describes - ' \
'try to nest them.'.freeze

def on_top_level_describe(node, _args)
return if single_top_level_describe?
return unless top_level_nodes.first == node

add_offense(node, :expression, MESSAGE)
add_offense(node, :expression, MSG)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cop/rspec/verified_doubles.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module RSpec
# widget = instance_double("Widget")
# end
class VerifiedDoubles < Cop
MSG = 'Prefer using verifying doubles over normal doubles.'
MSG = 'Prefer using verifying doubles over normal doubles.'.freeze

def on_send(node)
_receiver, method_name, *_args = *node
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/rspec/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module RuboCop
module RSpec
# Version information for the RSpec RuboCop plugin.
module Version
STRING = '1.3.1'
STRING = '1.4.0'.freeze
end
end
end

0 comments on commit 9aa33ee

Please sign in to comment.