Sha256: fed8909322849fa68f5badeb3c7fceb7b1d47c6730d7372225562a9df75bad71

Contents?: true

Size: 702 Bytes

Versions: 18

Compression:

Stored size: 702 Bytes

Contents

require "spec_helper"

module Refinery
  describe Pages do
    describe ".valid_templates" do
      before do
        File.open(File.join(subject.root, "spec", "ugisozols.html"), "w+") do
        end
      end

      after { File.delete(File.join(subject.root, "spec", "ugisozols.html")) }

      context "when pattern match valid templates" do
        it "returns an array of valid templates" do
          subject.valid_templates('spec', '*html*').should include("ugisozols")
        end
      end

      context "when pattern doesn't match valid templates" do
        it "returns empty array" do
          subject.valid_templates('huh', '*html*').should == []
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
refinerycms-pages-2.1.5 spec/lib/pages_spec.rb
refinerycms-pages-2.1.4 spec/lib/pages_spec.rb
refinerycms-pages-2.1.3 spec/lib/pages_spec.rb
refinerycms-pages-2.1.2 spec/lib/pages_spec.rb
refinerycms-pages-2.1.1 spec/lib/pages_spec.rb
refinerycms-pages-2.1.0 spec/lib/pages_spec.rb
refinerycms-pages-2.0.10 spec/lib/pages_spec.rb
refinerycms-pages-2.0.9 spec/lib/pages_spec.rb
refinerycms-pages-2.0.8 spec/lib/pages_spec.rb
refinerycms-pages-2.0.7 spec/lib/pages_spec.rb
refinerycms-pages-2.0.6 spec/lib/pages_spec.rb
refinerycms-pages-2.0.5 spec/lib/pages_spec.rb
refinerycms-pages-2.0.4 spec/lib/pages_spec.rb
refinerycms-page-menus-2.0.3 spec/lib/pages_spec.rb
refinerycms-pages-2.0.3 spec/lib/pages_spec.rb
refinerycms-pages-2.0.2 spec/lib/pages_spec.rb
refinerycms-pages-2.0.1 spec/lib/pages_spec.rb
refinerycms-pages-2.0.0 spec/lib/pages_spec.rb