Permalink
Browse files

o teste estava errado, por isso que passou o bug

  • Loading branch information...
1 parent 6a5afae commit b299d51580ba81a714ffae04b1047bb7c9054003 Juan Maiz committed May 13, 2011
Showing with 8 additions and 17 deletions.
  1. +2 −5 Gemfile.lock
  2. +6 −12 spec/moip_spec.rb
View
@@ -9,12 +9,12 @@ PATH
GEM
remote: http://rubygems.org/
specs:
- activesupport (3.0.1)
+ activesupport (3.0.7)
crack (0.1.8)
diff-lcs (1.1.2)
httparty (0.6.1)
crack (= 0.1.8)
- nokogiri (1.4.3.1)
+ nokogiri (1.4.4)
rspec (2.1.0)
rspec-core (~> 2.1.0)
rspec-expectations (~> 2.1.0)
@@ -28,8 +28,5 @@ PLATFORMS
ruby
DEPENDENCIES
- activesupport (>= 2.3.2)
- httparty (~> 0.6.1)
moip!
- nokogiri (~> 1.4.3)
rspec (~> 2.1.0)
View
@@ -70,8 +70,7 @@
it "should raise an exception when razao parameter is not passed" do
error = "É necessário informar a razão do pagamento"
- lambda { MoIP::Client.checkout(@billet_without_razao) }.should
- raise_error(MoIP::MissingPaymentTypeError,error)
+ lambda { MoIP::Client.checkout(@billet_without_razao) }.should raise_error(MoIP::MissingPaymentTypeError,error)
end
it "should have status 'Sucesso'" do
@@ -93,8 +92,7 @@
error = "Pagamento direto não é possível com a instituição de pagamento enviada"
- MoIP::Client.stub!(:post)
- .and_return("ns1:EnviarInstrucaoUnicaResponse"=>
+ MoIP::Client.stub!(:post).and_return("ns1:EnviarInstrucaoUnicaResponse"=>
{ "Resposta"=>
{
"Status"=>"Falha",
@@ -131,8 +129,7 @@
}
error = "Pagamento direto não é possível com a instituição de pagamento enviada"
- MoIP::Client.stub!(:post)
- .and_return("ns1:EnviarInstrucaoUnicaResponse"=>
+ MoIP::Client.stub!(:post).and_return("ns1:EnviarInstrucaoUnicaResponse"=>
{
"Resposta"=>
{
@@ -155,8 +152,7 @@
end
it "should raise an exception if status is fail" do
- MoIP::Client.stub!(:post)
- .and_return("ns1:EnviarInstrucaoUnicaResponse"=>
+ MoIP::Client.stub!(:post).and_return("ns1:EnviarInstrucaoUnicaResponse"=>
{ "Resposta"=>
{"Status"=>"Falha",
"Erro"=>"O status da resposta é Falha"
@@ -170,8 +166,7 @@
context "query a transaction token" do
before(:each) do
- MoIP::Client.stub!(:get)
- .and_return("ns1:ConsultarTokenResponse"=>
+ MoIP::Client.stub!(:get).and_return("ns1:ConsultarTokenResponse"=>
{ "RespostaConsultar"=>
{"Status"=>"Sucesso",
"ID"=>"201010291031001210000000046760"
@@ -193,8 +188,7 @@
context "in a error scenario" do
it "should retrieve status 'Falha'" do
- MoIP::Client.stub!(:get)
- .and_return("ns1:ConsultarTokenResponse"=>
+ MoIP::Client.stub!(:get).and_return("ns1:ConsultarTokenResponse"=>
{ "RespostaConsultar"=>
{"Status"=>"Falha",
"Erro"=>"Instrução não encontrada",

0 comments on commit b299d51

Please sign in to comment.