Sha256: 74344a5eb296a1a1d80de6d4382e24263d27e596b636e700114828aca93bd71b

Contents?: true

Size: 636 Bytes

Versions: 3

Compression:

Stored size: 636 Bytes

Contents

require 'spec_helper'

module Writefully
  describe Postable do 
    subject { ::Post.new } 

    describe "#klass_from" do 
      it "should return Writefully::Tag" do 
        expect(subject.klass_from("tag")).to eq "Writefully::Tag"
      end

      it "should turn Playlist" do 
        expect(subject.klass_from("playlist")).to eq "Playlist"
      end
    end

    it "should set published_at" do 
      subject.publish = true
      subject.publish_resource
      expect(subject.published_at).to_not be_nil
    end

    it "should taxonomize correctly" do 
      expect(subject.respond_to?(:playlists)).to be true
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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