Sha256: d0c4c413845834cb75812657441b44e44c351cd2f22ff02026e992cca3d5171d

Contents?: true

Size: 732 Bytes

Versions: 1

Compression:

Stored size: 732 Bytes

Contents

# -*- coding: utf-8 -*-
require 'spec_helper'

module Nwiki
  module Core
    describe Wiki do
      let(:path) { 'spec/examples/sample.git' }
      subject { described_class.new(path) }

      describe '#find' do
        it { subject.find('/foo').should eq Page.new("Foo", "* Foo\n** Bar\n[[icon.png]]\n", Wiki.parser) }
        it { subject.find('/icon.png').should be_kind_of File }
        it { subject.find('/not_exist_page').should be_nil }
        it { subject.find('/1/2/a').should_not be_nil }
        it { subject.find('/日本語ディレクトリ/わたしだ').should_not be_nil }
      end

      describe '#name' do
        it { subject.name.should eq 'ヽ(´・肉・`)ノログ' }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nwiki-0.0.2 spec/nwiki/core/wiki_spec.rb