Sha256: 32a8b32e00b390964c2e59035cd625464558743dd4e39d99b2e1e9d2e720db94
Contents?: true
Size: 1.13 KB
Versions: 3
Compression:
Stored size: 1.13 KB
Contents
require 'spec_helper' module Jekyll::AssetsPlugin describe SitePatch do let(:site) do Class.new do include SitePatch def config @config ||= { 'bundles' => 'foobar', 'assets' => { 'sources' => 'foobar' } } end def source @soure ||= '.' end end.new end context '#assets' do subject { site.assets } it { should be_an_instance_of Sprockets::Environment } end context '#assets_config' do subject { site.assets_config } it { should be_an_instance_of Configuration } it 'should been populated with `assets` section of config' do site.assets_config.bundles.should_not =~ %w{foobar} site.assets_config.sources.should =~ %w{foobar} end end it 'should be included into Jekyll::Site' do Jekyll::Site.included_modules.should include SitePatch end it 'should respond to #has_bundled_asset?' do @site.has_bundled_asset?(@site.assets['app.css']).should be_true @site.has_bundled_asset?(@site.assets['normalize.css']).should be_false end end end
Version data entries
3 entries across 3 versions & 1 rubygems