Sha256: dcfe3cde0d8d494feb3b53ab36c2a9ec5fa53cfb9f156adbce1e0552bc3cf840
Contents?: true
Size: 754 Bytes
Versions: 13
Compression:
Stored size: 754 Bytes
Contents
# encoding: utf-8 require 'spec_helper' RSpec.describe Transformers::FileKeeper do context '#transform' do it 'removes directories from array and keep files' do slide1 = instance_double('Middleman::Presentation::NewSlide') file = touch_file('01.html.erb') allow(slide1).to receive(:path).and_return absolute_path(file) slide2 = instance_double('Middleman::Presentation::NewSlide') directory = create_dir('01_dir') allow(slide2).to receive(:path).and_return absolute_path(directory) slides = [] slides << slide2 slides << slide1 slides = Transformers::FileKeeper.new.transform(slides) expect(slides).to include slide1 expect(slides).not_to include slide2 end end end
Version data entries
13 entries across 13 versions & 1 rubygems