Skip to content

Commit

Permalink
Eliminate RuboCop warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
laserlemon committed Nov 19, 2017
1 parent f602add commit 8258760
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions lib/rspec/wait/target.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class Target < RSpec::Expectations::ExpectationTarget
UndefinedValue = Module.new

# From: https://github.com/rspec/rspec-expectations/blob/v3.0.0/lib/rspec/expectations/expectation_target.rb#L30-L41
# rubocop:disable Metrics/MethodLength
def self.for(value, block, options = {})
if UndefinedValue.equal?(value)
unless block
Expand All @@ -18,6 +19,7 @@ def self.for(value, block, options = {})
new(value, options)
end
end
# rubocop:enable Metrics/MethodLength

# From: https://github.com/rspec/rspec-expectations/blob/v3.0.0/lib/rspec/expectations/expectation_target.rb#L25-L27
def initialize(target, options)
Expand Down
8 changes: 4 additions & 4 deletions spec/wait_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@
}.to raise_error(ArgumentError, /operator matcher/)
end

# TODO: Replace with a test asserting that an error is raised when passed a
# value argument for version 1.0.
# TODO: Replace with a test asserting that an error is raised when passed
# a value argument for version 1.0.
it "accepts a value rather than a block" do
expect {
wait.for(progress).to eq(".")
Expand Down Expand Up @@ -192,8 +192,8 @@
}.to raise_error(ArgumentError, /operator matcher/)
end

# TODO: Replace with a test asserting that an error is raised when passed a
# value argument for version 1.0.
# TODO: Replace with a test asserting that an error is raised when passed
# a value argument for version 1.0.
it "accepts a value rather than a block" do
expect {
wait.for(progress).not_to eq("..")
Expand Down

0 comments on commit 8258760

Please sign in to comment.