I'm using the Simplecov gem to output my test coverage and for an odd reason can not get 2 lines in my Rails instance method in my model to be captured. Also, any insight into why Simplecov states that the entire method is covered except for the 2 lines when I have not even included a describe block within my specs would be great as well. Any help would be greatly appreciated.
def process
if valid?
payment = Stripe::Charge.create(amount: amount, currency: "usd",
card: stripe_card, capture: false)
if (payment[:card][:address_line1_check] &&
payment[:card][:cvc_check] &&
payment[:card][:address_zip_check]).eql?("pass")
charge = Stripe::Charge.retrieve(payment[:id]) # This line is not captured
charge.capture # This line is not captured
end
self.transaction_number = payment.id
save!
end
end