Sha256: 6cdf79cff7634063905049ec5ce93b2a9ba18890026c7e6518546d29328e2d51
Contents?: true
Size: 871 Bytes
Versions: 23
Compression:
Stored size: 871 Bytes
Contents
require 'spec_helper' module Writefully describe Taxon do subject(:taxon) { Taxon.new(["Ruby", "Functional"], ["Ruby"], "Writefully::Tag")} it "#non_existing" do subject.non_existing.first.name.should eq "Functional" end its(:selector) { should eq :"writefully/tag" } its(:type_attribute) { should eq ({ type: nil }) } describe "when type is 'playlist'" do subject(:taxon) { Taxon.new(["Beginning Ruby", "Beginner"], ["Beginner"], "Playlist") } let(:attributes) { {name: "Beginning Ruby", slug: 'beginning-ruby', type: 'Playlist' } } its(:selector) { should eq :playlist } its(:type_attribute) { should eq ({type: "Playlist"}) } it "#build_attributes" do built_attributes = subject.build_attributes("Beginning Ruby") built_attributes.should eq attributes end end end end
Version data entries
23 entries across 23 versions & 1 rubygems