require 'spec_helper' describe Rtml::Test::SimulatorPostProcessors::Submit do def tml <<-end_tml end_tml end def mock_response resp = Rack::Response.new resp.body = "" resp end subject do Rtml::Test::Simulator.new() end before(:each) do subject.load_tml! tml end it "should have payment amount assigned" do subject.variables['payment.amount'].should == 100 end it "should dispatch a request" do subject.should_receive(:response).at_least(1).and_return(mock_response) subject.should_receive(:post).with("test_location", {'payment.amount' => 100}, {}) subject.visit "#do_submit" end end