Skip to content

Instantly share code, notes, and snippets.

@lpradovera
Created August 28, 2011 09:22
Show Gist options
  • Save lpradovera/1176465 to your computer and use it in GitHub Desktop.
Save lpradovera/1176465 to your computer and use it in GitHub Desktop.
it "should allow nested SSML elements" do
doc = RubySpeech::SSML.draw do
voice :gender => :male, :name => 'fred' do
string "Hi, I'm Fred. The time is currently "
say_as :interpret_as => 'date', :format => 'dmy' do
"01/02/1960"
end
end
end
voice = SSML::Voice.new(:gender => :male, :name => 'fred', :content => "Hi, I'm Fred. The time is currently ")
voice << SSML::SayAs.new(:interpret_as => 'date', :format => 'dmy', :content => "01/02/1960")
expected_doc = SSML::Speak.new
expected_doc << voice
doc.should == expected_doc
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment