Sha256: cb9cfd844d75f9ccc80bd5575f5a3dd4a5a1c710f8bbf54e212145acee85ae4b
Contents?: true
Size: 606 Bytes
Versions: 1
Compression:
Stored size: 606 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe "Item" do let(:xml) { File.open(File.expand_path(File.dirname(__FILE__) + '/../support/return.xml')).read } let(:transaction) { PagseguroCatcher::Transaction::Base.new(xml) } let(:item) { PagseguroCatcher::Transaction::Item.new(transaction[:items][:item].first) } describe ".initialize" do it "assigns the body" do item.body.should be_a(Hash) end end describe "#amount" do it "returns the amount as a float" do item.amount.should == 24300.00 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pagseguro_catcher-0.0.4 | spec/transaction/item_spec.rb |