2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-01-14 18:37:52 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Banzai::Querying do
|
|
|
|
describe '.css' do
|
|
|
|
it 'optimizes queries for elements with classes' do
|
|
|
|
document = double(:document)
|
|
|
|
|
|
|
|
expect(document).to receive(:xpath).with(/^descendant::a/)
|
|
|
|
|
|
|
|
described_class.css(document, 'a.gfm')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|