Sha256: b54bbee2a0abb01c754bb8959919ccc8537e1b1e210c12141bba73634733245b

Contents?: true

Size: 780 Bytes

Versions: 3

Compression:

Stored size: 780 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",
      "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)     { is_expected.to 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

3 entries across 3 versions & 1 rubygems

Version Path
writefully-0.8.2 spec/lib/writefully/content_spec.rb
writefully-0.8.1 spec/lib/writefully/content_spec.rb
writefully-0.8.0 spec/lib/writefully/content_spec.rb