lib/synvert/snippets/rspec/collection_matcher.rb in synvert-0.0.10 vs lib/synvert/snippets/rspec/collection_matcher.rb in synvert-0.0.11

- old
+ new

@@ -1,6 +1,6 @@ Synvert::Rewriter.new "convert_rspec_collection_matcher", "RSpec converts collection matcher" do - gem_spec 'rspec', '2.99.0' + if_gem 'rspec', {gte: '2.11.0'} {have: 'eq', have_exactly: 'eq', have_at_least: 'be >=', have_at_most: 'be <='}.each do |old_matcher, new_matcher| within_files 'spec/**/*_spec.rb' do # expect(collection).to have(3).items => expect(collection.size).to eq(3) # expect(collection).to have_exactly(3).items => expect(collection.size).to eq(3)