spec/rubocop/rspec/language/selector_set_spec.rb in rubocop-rspec-1.8.0 vs spec/rubocop/rspec/language/selector_set_spec.rb in rubocop-rspec-1.9.0

- old
+ new

@@ -19,11 +19,31 @@ it 'returns true for selectors in the set' do expect(selector_set.include?(:foo)).to be(true) end end - context '#to_node_pattern' do + context '#node_pattern' do it 'builds a node pattern' do - expect(selector_set.to_node_pattern).to eql(':foo :bar') + expect(selector_set.node_pattern).to eql(':foo :bar') + end + end + + context '#node_pattern_union' do + it 'builds a node pattern union' do + expect(selector_set.node_pattern_union).to eql('{:foo :bar}') + end + end + + context '#send_pattern' do + it 'builds a send matching pattern' do + expect(selector_set.send_pattern).to eql('(send _ {:foo :bar} ...)') + end + end + + context '#block_pattern' do + it 'builds a block matching pattern' do + expect(selector_set.block_pattern).to eql( + '(block (send _ {:foo :bar} ...) ...)' + ) end end end