spec/rubocop/rspec/example_spec.rb in rubocop-rspec-1.9.1 vs spec/rubocop/rspec/example_spec.rb in rubocop-rspec-1.10.0
- old
+ new
@@ -1,9 +1,9 @@
# frozen_string_literal: true
RSpec.describe RuboCop::RSpec::Example do
- include RuboCop::Sexp
+ include RuboCop::AST::Sexp
def example(source)
described_class.new(parse_source(source).ast)
end
@@ -21,10 +21,10 @@
expect(example('it { foo }').doc_string).to be(nil)
end
it 'extracts keywords' do
expect(example("it('foo', :bar, baz: :qux) { a }").metadata)
- .to eql([s(:sym, :bar), s(:hash, s(:pair, s(:sym, :baz), s(:sym, :qux)))])
+ .to eq([s(:sym, :bar), s(:hash, s(:pair, s(:sym, :baz), s(:sym, :qux)))])
end
it 'extracts implementation' do
expect(example('it("foo") { bar; baz }').implementation)
.to eql(s(:begin, s(:send, nil, :bar), s(:send, nil, :baz)))