These are chat archives for rebelidealist/stripe-ruby-mock

5th
Aug 2015
Sikandar Shukla
@bhaity
Aug 05 2015 17:57
any way to expand the customer obj on charges
?
Sikandar Shukla
@bhaity
Aug 05 2015 23:05
hi there having some trouble getting this to work with factory girl. im doing something wrong in my rspec config i think
RSpec.configure do |config|

  config.before(:each) do
    StripeMock.start
  end

  config.after(:each) do
    StripeMock.stop
  end

end
am i doing something wrong here?
require 'stripe_mock'

FactoryGirl.define do
  factory :donor do
    stripe_card_token StripeMock.create_test_helper.generate_card_token
    firstname "John"
    lastname "Smith"
  end
end
Sikandar Shukla
@bhaity
Aug 05 2015 23:11
the attr in the factory is getting set fine. but my tests arent running agaisnt stripe mock it seems
Sikandar Shukla
@bhaity
Aug 05 2015 23:24
@iamkevingreen how did you resolve this? "I don't think it's actually an issue with you guys at all, but actually an issue with how factory girl is interacting with the rest of the test suite, even though we create the users with factory girl it appears to run factory girl outside of the config it doesn't understand that the stripemock is running when you put stripemock code inside the factory"
Sikandar Shukla
@bhaity
Aug 05 2015 23:32
@freesteph how did you resolve your factorygirl issues?