Created
November 19, 2011 12:54
-
-
Save richievos/1378807 to your computer and use it in GitHub Desktop.
Spectastrophe #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
describe "Something doppelganger" do | |
describe "RailCar" do | |
let(:gateway) { RailCar.new :login => "a", :password => "b" } | |
describe "#commit" do | |
let(:response) { railcar.send :commit, request, {} } | |
describe "response" do | |
subject { response } | |
context "with a REJECTed rail car" do | |
let(:request) { gateway.send(:build_auth_request, 9011, "token", {}) } | |
before { | |
railcar.stub(:parse).and_return( | |
:requestID => "123", | |
:vehicleCodeRaw => "N9", | |
:requestToken => "AFLAKJFLDKJFSLDKFJSLDFKJn129399NANF)(A)FNnnnfnfnnfnf", | |
:amount => "90.01", | |
) | |
} | |
its(:name) { should_not be_nil } | |
end | |
end | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
describe "Something doppelganger" do | |
it "has an name for a REJECTed rail car" do | |
railcar = RailCar.new :login => "a", :password => "b" | |
railcar.stub(:parse).and_return( | |
:requestID => "123", | |
:vehicleCodeRaw => "N9", | |
:requestToken => "AFLAKJFLDKJFSLDKFJSLDFKJn129399NANF)(A)FNnnnfnfnnfnf", | |
:amount => "90.01", | |
) | |
request = railcar.send(:build_request, 9011, "token", {}) | |
response = railcar.send(:commit, request, {}) | |
response.name.should_not be_nil | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment