-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trying to run tests as a developer... #549
Comments
Actually - I've worked that one out - there was a line in tax_rate_test.rb which really needs to be in unit_test_helper. See PR |
Personally, I use Insomnia Rest client to run the authorisation, then I export my access token & tenantId into my local environment I guess this could be resolved by writing some setup tests which throw open a browser to conduct the oauth flow, to save the token & tenantId in the test environment. The demo company needs to be manually reset, which is an additional complication for running automated tests. |
Thanks Riley. What do you think about adding vcr to the test setup and making the setup and (re)generation of the vcr cassettes a manual occasional process for developers? However maybe given that xero are behind https://github.com/XeroAPI/xero-ruby maybe it's more sensible for me to focus efforts on switching to that gem rather than pouring effort into this one. |
Hey @timdiggins, if you are at an early enough stage that switching is possible, then moving to xero-ruby would make sense. Xero will definitely be focusing its efforts on that SDK. Xeroizer has always been a community led effort. But where ever you choose to throw PRs, we definitely appreciate them! 👍 |
I'm trying to run the tests as a developer (working on #538 )
I've set up a Demo company and custom connection and set
export XERO_CLIENT_ID=
to given id and created as secret and set it locally asexport XERO_CLIENT_SECRET=
. However it's not that obvious how or what to setXERO_ACCESS_TOKEN
andXERO_TENANT_ID
to. As a result some of the non-unit tests are failing. But that's noise. Everything else passes when I dobundle exec rake test
I'm trying to run one file but when I try
bundle exec rake test TEST=test/unit/record/base_test.rb
I get lots of these kind of tracebacks:I don't often use minitest/shoulda but somether here is not set up correctly when running a single test.
Any ideas?
The text was updated successfully, but these errors were encountered: