Sha256: edad6fc4bf9c7c8d4c818ac2ed74a8b03202b79f1ae803c0a6fd0fcea9803798

Contents?: true

Size: 825 Bytes

Versions: 10

Compression:

Stored size: 825 Bytes

Contents

require 'spec_helper'

module Writefully
  describe Content do 
    let(:index) { {site: 'codemy-net', resource: 'posts', slug: '1-hash-selector-pattern' } }
    let(:meta)  { { 
      "title"        => "Ruby Hash Selector Pattern",
      "slug"        => "ruby-hash-selector-pattern",
      "tags"        => ["Ruby"],
      "playlists"   => ["A Shot of Ruby"],
      "details"     => { "blurb" => "We show you an alternative to if / else and case / switch.",
                         "cover" => "assets/hash-selector-icon.png" },
      "position"    => 1
    } }
    subject(:content) { Writefully::Content.new(index) }

    its(:body)     { should include "# Hash Selector Pattern" }
    its(:meta)     { should eq meta }
    its(:slug)     { should eq 'hash-selector-pattern' }
    its(:position) { should eq 1 }
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
writefully-0.4.10 spec/lib/writefully/content_spec.rb
writefully-0.4.8 spec/lib/writefully/content_spec.rb
writefully-0.4.7 spec/lib/writefully/content_spec.rb
writefully-0.4.6 spec/lib/writefully/content_spec.rb
writefully-0.4.5 spec/lib/writefully/content_spec.rb
writefully-0.4.4 spec/lib/writefully/content_spec.rb
writefully-0.4.2 spec/lib/writefully/content_spec.rb
writefully-0.4.1 spec/lib/writefully/content_spec.rb
writefully-0.4.0 spec/lib/writefully/content_spec.rb
writefully-0.3.6 spec/lib/writefully/content_spec.rb