Skip to content
This repository was archived by the owner on Jul 3, 2020. It is now read-only.

Commit 159d128

Browse files
sohaibbhattifloehopper
authored andcommitted
Upgrade rspec to latest 3.x version & fix deprecation warnings
Closes #2
1 parent a7b0855 commit 159d128

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

method_log.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ Gem::Specification.new do |s|
2626
s.add_dependency 'trollop'
2727

2828
s.add_development_dependency 'rake'
29-
s.add_development_dependency 'rspec', '~> 2.0'
29+
s.add_development_dependency 'rspec', '~> 3.0'
3030
end

spec/method_diff_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ module MethodLog
99
let(:diff) { MethodDiff.new(first_commit, second_commit) }
1010

1111
it 'generates text diff of the method source for two commits' do
12-
first_commit.stub(:method_source).and_return(%{line 1\nline 2\n})
13-
second_commit.stub(:method_source).and_return(%{line 2\nline 3\n})
12+
allow(first_commit).to receive(:method_source).and_return(%{line 1\nline 2\n})
13+
allow(second_commit).to receive(:method_source).and_return(%{line 2\nline 3\n})
1414
expect(diff.to_s).to eq(%{-line 1\n line 2\n+line 3\n})
1515
end
1616
end

spec/source_file_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def bar
3939
end
4040

4141
it 'looks up source in repository using SHA if no source set' do
42-
repository.stub(:lookup).with(sha).and_return(blob)
42+
allow(repository).to receive(:lookup).with(sha).and_return(blob)
4343
file = source(path: 'path/to/source.rb', repository: repository, sha: sha)
4444
expect(file.source).to eq('source')
4545
end

0 commit comments

Comments
 (0)