Sha256: 317470b0968e727dd2f85fa75d95c7339df3e21d5c98570373f2f1078b5b76dd
Contents?: true
Size: 695 Bytes
Versions: 4
Compression:
Stored size: 695 Bytes
Contents
# encoding: utf-8 require 'spec_helper' RSpec.describe CssClassExtracter do context '#extract' do it 'extract classes' do file = create_file 'index.html', <<-EOS.strip_heredoc <html class="hello"> </html> EOS klasses = CssClassExtracter.new.extract([file]) expect(klasses.size).to eq 1 expect(klasses.first.name).to eq 'hello' end it 'ignores classes' do file = create_file 'index.html', <<-EOS.strip_heredoc <html class="hello test"> </html> EOS klasses = CssClassExtracter.new.extract([file], ignore: ['test']) expect(klasses.size).to eq 1 expect(klasses.first.name).to eq 'hello' end end end
Version data entries
4 entries across 4 versions & 1 rubygems