Sha256: 4c3c273781775907cd570dbecdb18d63b08c8529f9886a01234935e038b3a046

Contents?: true

Size: 651 Bytes

Versions: 5

Compression:

Stored size: 651 Bytes

Contents

# -*- coding: utf-8 -*-
require "sixarm_ruby_markdown_test"

describe SixArm::Markdown::File do

  let(:dir){ File.expand_path File.dirname(__FILE__) }
  let(:file_path){ dir + "tempfile"}
  let(:text){ "foo" }

  describe "#slurp" do

    before do
      file = SixArm::Markdown::File.new(file_path, "w")
      file.write(text)
      file.close      
    end

    it "read and scrub, and return a Markdown::String" do
      file = SixArm::Markdown::File.new(file_path)
      s = file.slurp
      expect(s).must_equal text
      expect(s).must_be_kind_of SixArm::Markdown::String
    end

    after do
      File.delete(file_path)
    end

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sixarm_ruby_markdown-3.1.0 test/sixarm_ruby_markdown_test/sixarm/markdown/file_test.rb
sixarm_ruby_markdown-3.0.2 test/sixarm_ruby_markdown_test/sixarm/markdown/file_test.rb
sixarm_ruby_markdown-3.0.1 test/sixarm_ruby_markdown_test/sixarm/markdown/file_test.rb
sixarm_ruby_markdown-2.1.3 test/sixarm_ruby_markdown_test/sixarm/markdown/file_test.rb
sixarm_ruby_markdown-2.0.0 test/sixarm_ruby_markdown_test/sixarm/markdown/file_test.rb