spec/models/rtml/document_spec.rb in rtml-2.0.3 vs spec/models/rtml/document_spec.rb in rtml-2.0.4
- old
+ new
@@ -1,8 +1,16 @@
require File.join(__FILE__.gsub(/(.*)?\/spec\/.*$/, '\1'), 'spec/spec_helper')
describe Rtml::Document do
include Webrat::Matchers
+
+ it "should link multiple screens using strings properly" do
+ @doc = Rtml::Document.new
+ @doc.screen :first, "swipe_card_trans_reject"
+ @doc.screen "swipe_card_trans_reject"
+
+ @doc.to_tml.should =~ /next uri="#swipe_card_?[0-9]+/
+ end
context "with one Screen instruction" do
before :each do
@doc = Rtml::Document.create!(:name => "My Document")
Rtml::Instruction.create!(:source => @doc, :name => "screen", :arguments => {:name => 'test'})