You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm the guy who committed 996ef55.
I needed the fix for an app I'm working on and it now works fine for me.
However I was not able to add a test case for the PR.
I could use some help on how you do testing and how to set them up to get started.
Are you using any kind of request mocking?
firstly thanks for the commit, i'm happy that this GEM was usefull to
somebody.
About the mocking requests, i'm not using a such system. I'm querying the
actual Transifex API.
I know it is not a best practice but it is my first gem and i don't really
know much about mocking requests, also i don't understand how mocking the
API requests allow us to actually test the API in real conditions^^).
You provide your own Transifex Credentials in reset_transifex_configuration and
it should then perform the tests by querying the Transifex API ie create
some projetc then delete it and so on...(it also should answer your last
question)
So you could replace the Transifex::Project.new(slug) by
Transifex::Projects.create(creation_params) in all the concerned files. I
unfortunately don't have a functionnal Transifex Account anymore (trial
expired).
Hi, I'm the guy who committed 996ef55 996ef55
.
I needed the fix for an app I'm working on and it now works fine for me.
However I was not able to add a test case for the PR.
I could use some help on how you do testing and how to set them up to get
started.
Are you using any kind of request mocking?
Activity
Fred-grais commentedon Oct 17, 2014
Hello,
firstly thanks for the commit, i'm happy that this GEM was usefull to
somebody.
About the mocking requests, i'm not using a such system. I'm querying the
actual Transifex API.
I know it is not a best practice but it is my first gem and i don't really
know much about mocking requests, also i don't understand how mocking the
API requests allow us to actually test the API in real conditions^^).
What you got to do if you want to test your modifications is in
https://github.com/Fred-grais/transifex-interface-ruby/blob/master/spec/spec_helper.rb
You provide your own Transifex Credentials in reset_transifex_configuration and
it should then perform the tests by querying the Transifex API ie create
some projetc then delete it and so on...(it also should answer your last
question)
Note that for some tests i used a project that was already created on my
Transifex Account like in
https://github.com/Fred-grais/transifex-interface-ruby/blob/master/spec/lib/transifex/project_languages_spec.rb
(line 5)
So you could replace the Transifex::Project.new(slug) by
Transifex::Projects.create(creation_params) in all the concerned files. I
unfortunately don't have a functionnal Transifex Account anymore (trial
expired).
2014-10-17 18:31 GMT+02:00 Łukasz Adamczak notifications@github.com: