Skip to content

Instantly share code, notes, and snippets.

@douglasnomizo
Created December 10, 2014 06:26
Show Gist options
  • Save douglasnomizo/ee78a0db9eb452ecabaa to your computer and use it in GitHub Desktop.
Save douglasnomizo/ee78a0db9eb452ecabaa to your computer and use it in GitHub Desktop.
require 'rspec'
require './transaction_fee_calculation'
describe 'calculation' do
it "tax should be 0.1 for 5 Bitcoins" do
expect(FeeCalculator.for(5)).to eq(0.1)
end
it "tax should be 0.2 for 10 Bitcoins" do
expect(FeeCalculator.for(10)).to eq(0.2)
end
it "tax should be 0.3 for 20 Bitcoins" do
expect(FeeCalculator.for(20)).to eq(0.3)
end
it "tax should be 0.65 for 60 Bitcoins" do
expect(FeeCalculator.for(60)).to eq(0.65)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment