Sha256: 9c8c5844c393b2a5e7d630e174e4ccdd858b0fc54a138ca0b525df67c6a29794
Contents?: true
Size: 946 Bytes
Versions: 2
Compression:
Stored size: 946 Bytes
Contents
require 'spec_helper' require 'haravan_theme/filters/blacklist' module HaravanTheme module Filters describe "Blacklist" do BLACKLIST_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 return the entire list back if initialized with no patterns" do blacklist = Blacklist.new assert_equal BLACKLIST_TEST_PATHS, blacklist.select(BLACKLIST_TEST_PATHS) end it "should return everything except for the items that matched the pattern" do blacklist = Blacklist.new(%w(config/* settings.html assets/* templates/* snippets/*)) assert_equal %w(layout/thing1.html), blacklist.select(BLACKLIST_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/blacklist_spec.rb |
haravan_theme-0.0.25 | spec/unit/filters/blacklist_spec.rb |