# The nice new braintree\_orange\_test.rb is confused about what "purchases" are

**URL:** <https://www.ruby-forum.com/t/the-nice-new-braintree-orange-test-rb-is-confused-about-what-purchases-are/194135>\
**Category:** Ruby\
**Created:** [August 30, 2010, 11:16pm UTC](https://www.ruby-forum.com/t/the-nice-new-braintree-orange-test-rb-is-confused-about-what-purchases-are/194135 "2010-08-30T23:16:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phlip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Post date:** [August 30, 2010, 11:16pm UTC](https://www.ruby-forum.com/t/the-nice-new-braintree-orange-test-rb-is-confused-about-what-purchases-are/194135/1 "2010-08-30T23:16:35Z")

</div>

…inside the otherwise truly awesome ActiveGateway:

def test\_successful\_purchase  
@gateway.expects(:ssl\_post).returns(successful\_purchase\_response)  
assert response = @gateway.authorize(@amount, @credit\_card,  
@options)  
assert\_instance\_of Response, response  
assert\_success response  
assert\_equal ‘510695343’, response.authorization  
end

This is not a question; just a tip that I hope someone can bubble up  
to the maintainers.

Note the discrepancy between the test case name and the @gateway.  
method that actually gets called! C-:

( Oh, BTW, I made an example of other aspects of AG’s test suite here:

[Radar – O’Reilly](http://broadcast.oreilly.com/2010/05/abstract-tests.html) )

Happy coding, y’all!

---

<div class="post-metadata">

**Author:** ![Phlip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Post date:** [August 31, 2010, 11:18am UTC](https://www.ruby-forum.com/t/the-nice-new-braintree-orange-test-rb-is-confused-about-what-purchases-are/194135/2 "2010-08-31T11:18:48Z")

</div>

Phlip wrote:

> This is not a question; just a tip that I hope someone can bubble up  
> to the maintainers.

If this is a Rails-related tip, it would find the most appropriate  
audience on a Rails mailing list.

This mailing list is for Ruby, the programming language; Rails is an  
application which just happens to be written _in_ Ruby.

Regards,

Brian.

---

<div class="post-metadata">

**Author:** ![Phlip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Post date:** [August 31, 2010, 6:25pm UTC](https://www.ruby-forum.com/t/the-nice-new-braintree-orange-test-rb-is-confused-about-what-purchases-are/194135/3 "2010-08-31T18:25:50Z")

</div>

On Aug 31, 2:20 am, Brian C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Phlip wrote:
> 
> > This is not a question; just a tip that I hope someone can bubble up  
> > to the maintainers.
> 
> If this is a Rails-related tip, it would find the most appropriate  
> audience on a Rails mailing list.
> 
> This mailing list is for Ruby, the programming language; Rails is an  
> application which just happens to be written _in_ Ruby.

Neither is the Rails mailing list correct for a plugin, duh.
