Browse files

Skeleton

  • Loading branch information...
0 parents commit ee462eefcb286136cbe39aae7a48b318272e2730 @pwim pwim committed Nov 23, 2011
Showing with 13 additions and 0 deletions.
  1. +5 −0 lib/PaypalCalculator.coffee
  2. +8 −0 spec/PaypalCalculator.spec.coffee
5 lib/PaypalCalculator.coffee
@@ -0,0 +1,5 @@
+root = exports ? this
+class root.PaypalCalculator
+ constructor: (@avg_transaction, @transactions) ->
+ @merchant_rate = this.basic_rate
+ basic_rate: 0.036
8 spec/PaypalCalculator.spec.coffee
@@ -0,0 +1,8 @@
+require "coffee-script"
+paypalCalculator = require "../lib/PaypalCalculator"
+
+describe 'paypal calculator', ->
+ it 'should calulater merchant rate', ->
+ calculator = new paypalCalculator.PaypalCalculator(1000, 10)
+ expect(calculator.basic_rate).toEqual 0.036
+ expect(calculator.merchant_rate).toEqual 0.036

0 comments on commit ee462ee

Please sign in to comment.