Sha256: a8b0cfd35ff99ad0f4588aecedaa98b1ff02129b9673cb356f7de2d81f8779a4

Contents?: true

Size: 565 Bytes

Versions: 1

Compression:

Stored size: 565 Bytes

Contents

require 'spec_helper'

module Gram
  module Blog
    describe Parser do
      
      describe ".parse" do
        it 'converts a file into a hash' do
          file = double :file
          raw = """
---
title: My title
tagline: My tagline
---

#My post
#
Blah
          """
          File.stub(:read).with(file).and_return raw

          subject.parse(file).should == { title: 'My title',
                                          tagline: 'My tagline',
                                          body: "#My post\n#\nBlah"}
        end
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gram-0.0.1 spec/gram/blog/parser_spec.rb