Permalink
Browse files

Reword spec.

  • Loading branch information...
Gabe Berke-Williams
Gabe Berke-Williams committed Jan 13, 2012
1 parent 59a7b60 commit 0a45900bef61c8981aeafdf6cb08856844caf683
Showing with 4 additions and 4 deletions.
  1. +4 −4 spec/fake_braintree_spec.rb
@@ -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
@@ -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.