Skip to content

Commit 9341640

Browse files
committed
Backport pull request #1089 from rspec/fix-ruby-warnings
Fix warnings and deprecations notices
2 parents 6385491 + 8e05413 commit 9341640

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ gem 'sqlite3', '~> 1.3.6'
2727

2828
# Capybara versions that support RSpec 3 only support RUBY_VERSION >= 1.9.3
2929
if RUBY_VERSION >= '1.9.3'
30-
gem 'capybara', '2.2.0'
30+
gem 'capybara', '~> 2.3.0'
3131
end
3232

3333
if RUBY_VERSION < '1.9.2'

features/support/env.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
require 'aruba/cucumber'
22

33
module ArubaExt
4-
def run(cmd)
5-
super(cmd =~ /^rspec/ ? "bin/#{cmd}" : cmd)
4+
def run(cmd, timeout = nil)
5+
exec_cmd = cmd =~ /^rspec/ ? "bin/#{cmd}" : cmd
6+
super(exec_cmd, timeout)
67
end
78
end
89

rspec-rails.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ Gem::Specification.new do |s|
4040

4141
s.add_development_dependency 'rake', '~> 10.0.0'
4242
s.add_development_dependency 'cucumber', '~> 1.3.5'
43-
s.add_development_dependency 'aruba', '~> 0.4.11'
43+
s.add_development_dependency 'aruba', '~> 0.5.4'
4444
s.add_development_dependency 'ammeter', '1.0.0'
4545
end

spec/rspec/rails/matchers/route_to_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ def assert_recognizes(*)
109109
context "with should_not" do
110110
context "when assert_recognizes passes" do
111111
it "fails with custom message" do
112-
expect do
112+
expect{
113113
expect({:get => "path"}).not_to route_to("these" => "options")
114-
end.to raise_error(/expected {:get=>"path"} not to route to {"these"=>"options"}/)
114+
}.to raise_error(/expected \{:get=>"path"\} not to route to \{"these"=>"options"\}/)
115115
end
116116
end
117117

spec/rspec/rails/minitest_lifecycle_adapter_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
define_method(:after_teardown) { invocations << :after_teardown }
1313
end
1414

15-
example = example_group.example("foo") { invocations << :example }
15+
example_group.example("foo") { invocations << :example }
1616
example_group.run(NullObject.new)
1717

1818
expect(invocations).to eq([

spec/support/shared_examples.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def define_group_in(path, group_definition)
1212
Dir.mktmpdir("rspec-rails-app-root") do |dir|
1313
Dir.chdir(dir) do
1414
path.mkpath
15-
spec_file = File.open(file, "w") do |f|
15+
File.open(file, "w") do |f|
1616
f.write("$_new_group = #{group_definition}")
1717
end
1818

0 commit comments

Comments
 (0)