Sha256: e0410dfc13891961b09000d22f6a01421109cbf9d686861327dfdd96c149f17f
Contents?: true
Size: 1.43 KB
Versions: 14
Compression:
Stored size: 1.43 KB
Contents
require 'spec_helper' module RubySpeech module SSML describe Mark do let(:doc) { Nokogiri::XML::Document.new } subject { described_class.new doc } its(:node_name) { should == 'mark' } describe "setting options in initializers" do subject { Mark.new doc, :name => 'foo' } its(:name) { should == 'foo' } end it 'registers itself' do Element.class_from_registration(:mark).should == Mark end describe "from a document" do let(:document) { '<mark name="foo"/>' } subject { Element.import document } it { should be_instance_of Mark } its(:name) { should == 'foo' } end describe "#name" do before { subject.name = 'foo' } its(:name) { should == 'foo' } end describe "<<" do it "should always raise InvalidChildError" do lambda { subject << 'anything' }.should raise_error(InvalidChildError, "A Mark cannot contain children") end end describe "comparing objects" do it "should be equal if the name is the same" do Mark.new(doc, :name => "foo").should == Mark.new(doc, :name => "foo") end describe "when the name is different" do it "should not be equal" do Mark.new(doc, :name => "foo").should_not == Mark.new(doc, :name => "bar") end end end end # Mark end # SSML end # RubySpeech
Version data entries
14 entries across 14 versions & 1 rubygems