Skip to content

Commit

Permalink
Reword spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabe Berke-Williams committed Jan 13, 2012
1 parent 59a7b60 commit 0a45900
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/fake_braintree_spec.rb
Expand Up @@ -89,7 +89,7 @@ def write_to_log
end

describe FakeBraintree, ".generate_transaction" do
it "includes the subscription id" do
it "allows setting the subscription id" do
transaction = FakeBraintree.generate_transaction(:subscription_id => 'foobar')
transaction['subscription_id'].should == 'foobar'
end
Expand Down Expand Up @@ -120,19 +120,19 @@ def write_to_log
Timecop.freeze do
transaction = FakeBraintree.generate_transaction(:status => Braintree::Transaction::Status::Failed,
:subscription_id => 'my_subscription_id')
transaction['status_history'][0]['timestamp'].should == Time.now
transaction['status_history'].first['timestamp'].should == Time.now
end
end

it "has the desired amount" do
transaction = FakeBraintree.generate_transaction(:amount => '20.00')
transaction['status_history'][0]['amount'].should == '20.00'
transaction['status_history'].first['amount'].should == '20.00'
end

it "has the desired status" do
status = Braintree::Transaction::Status::Failed
transaction = FakeBraintree.generate_transaction(:status => status)
transaction['status_history'][0]['status'].should == status
transaction['status_history'].first['status'].should == status
end
end
end

0 comments on commit 0a45900

Please sign in to comment.