Skip to content

Commit

Permalink
Merge pull request #1474 from pirj/fix-rspec-deprecations
Browse files Browse the repository at this point in the history
Fix RSpec deprecations
  • Loading branch information
lsegal committed Apr 8, 2023
2 parents cecdc48 + 258b0f6 commit cdb8f85
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ def puts(str = '')
RSpec.configure do |config|
config.before(:each) { log.io = StringIO.new }

config.raise_errors_for_deprecations!

# isolate environment of each test
# any other global settings which might be modified by a test should also
# be saved and restored here
Expand Down
2 changes: 1 addition & 1 deletion spec/tags/types_explainer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def parse(types)
end

def parse_fail(types)
expect(lambda { parse(types) }).to raise_error(SyntaxError)
expect { parse(types) }.to raise_error(SyntaxError)
end

describe Type, '#to_s' do
Expand Down
4 changes: 2 additions & 2 deletions spec/templates/tag_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def m(opts = {}) end
module Foo; end
eof

proc = lambda { Registry.at('Foo').format(html_options) }
expect(proc).not_to raise_error
expect { Registry.at('Foo').format(html_options) }
.not_to raise_error
end
end
end

0 comments on commit cdb8f85

Please sign in to comment.