Sha256: 384b1fd59c374272265b778a475555d677b950387b52bfe06f897cce4f3f27e2
Contents?: true
Size: 1.3 KB
Versions: 2
Compression:
Stored size: 1.3 KB
Contents
require 'spec_helper' require 'haravan_theme/filters/whitelist' module HaravanTheme module Filters describe "Whitelist" do WHITELIST_TEST_PATHS = %w( settings.html config/item1.html config/item2.html config/item3.html layout/thing1.html assets/application.css.liquid assets/application.js templates/thing2.html snippets/fancy.liquid ) it "should use the default whitelist if nothing was provided" do whitelist = Whitelist.new expected = %w( config/item1.html config/item2.html config/item3.html layout/thing1.html assets/application.css.liquid assets/application.js templates/thing2.html snippets/fancy.liquid ) assert_equal expected, whitelist.select(WHITELIST_TEST_PATHS) end it "should ignore the default 1+ whitelists were provided" do whitelist = Whitelist.new %w(settings.html config/item1.html config/item2.html config/item3.html layout/ templates/) expected = %w(settings.html config/item1.html config/item2.html config/item3.html layout/thing1.html templates/thing2.html) assert_equal expected, whitelist.select(WHITELIST_TEST_PATHS) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
haravan_theme-0.0.26 | spec/unit/filters/whitelist_spec.rb |
haravan_theme-0.0.25 | spec/unit/filters/whitelist_spec.rb |