lib/synvert/snippets/rspec/one_liner_expectation.rb in synvert-0.0.10 vs lib/synvert/snippets/rspec/one_liner_expectation.rb in synvert-0.0.11
- old
+ new
@@ -1,6 +1,6 @@
Synvert::Rewriter.new "convert_rspec_one_liner_expectation", "RSpec converts one liner expectation" do
- gem_spec 'rspec', '2.99.0'
+ if_gem 'rspec', {gte: '2.99.0'}
{should: 'to', should_not: 'not_to'}.each do |old_message, new_message|
matcher_converters = {have: 'eq', have_exactly: 'eq', have_at_least: 'be >=', have_at_most: 'be <='}
matcher_converters.each do |old_matcher, new_matcher|
within_files 'spec/**/*.rb' do