Sha256: 8aef08d41c536f6d9a1f21edfcdeef58e8a7113dead1f6ba1b773f7ac9005afd

Contents?: true

Size: 620 Bytes

Versions: 23

Compression:

Stored size: 620 Bytes

Contents

require 'spec_helper'

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

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

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

    it "should set published_at" do 
      subject.publish = true
      subject.publish_resource
      subject.published_at.should_not be_nil
    end

    it "should taxonomize correctly" do 
      subject.respond_to?(:playlists).should be_true
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
writefully-0.7.1 spec/lib/writefully/postable_spec.rb
writefully-0.6.12 spec/lib/writefully/postable_spec.rb
writefully-0.6.11 spec/lib/writefully/postable_spec.rb
writefully-0.6.10 spec/lib/writefully/postable_spec.rb
writefully-0.6.9 spec/lib/writefully/postable_spec.rb
writefully-0.6.7 spec/lib/writefully/postable_spec.rb
writefully-0.6.6 spec/lib/writefully/postable_spec.rb
writefully-0.6.5 spec/lib/writefully/postable_spec.rb
writefully-0.6.4 spec/lib/writefully/postable_spec.rb
writefully-0.6.3 spec/lib/writefully/postable_spec.rb
writefully-0.6.2 spec/lib/writefully/postable_spec.rb
writefully-0.5.1 spec/lib/writefully/postable_spec.rb
writefully-0.5.0 spec/lib/writefully/postable_spec.rb
writefully-0.4.10 spec/lib/writefully/postable_spec.rb
writefully-0.4.8 spec/lib/writefully/postable_spec.rb
writefully-0.4.7 spec/lib/writefully/postable_spec.rb
writefully-0.4.6 spec/lib/writefully/postable_spec.rb
writefully-0.4.5 spec/lib/writefully/postable_spec.rb
writefully-0.4.4 spec/lib/writefully/postable_spec.rb
writefully-0.4.2 spec/lib/writefully/postable_spec.rb