Skip to content

Rspec proposal #52

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

Merged
merged 36 commits into from
Nov 29, 2019
Merged

Rspec proposal #52

merged 36 commits into from
Nov 29, 2019

Conversation

darthjee
Copy link
Contributor

@darthjee darthjee commented Nov 6, 2019

This is a proposal about using RSpec for unit testing

My idea, if you are up to it, would be to rewrite the tests in rspec format so that later I could split the gnuplot file to organize the code to facilitate contributions.

Here I am also adding simplecov to check spec code coverage

describe "Array Plot Example" do
let(:file_path) { 'spec/tmp/array_plot.eps' }
let(:fixture_path) { 'spec/fixtures/plots/array_plot.eps' }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the idea of this test is rely on a pregenerated file when testing the whole integration

@rdp
Copy link
Owner

rdp commented Nov 7, 2019 via email

@darthjee
Copy link
Contributor Author

darthjee commented Nov 7, 2019

Well, since this is the first proposal, I would sugest not to merge yet, and I will write the specs for everything and then we do just one merge, WDYT?

About being maintainer, I could do that yes, I have deeply interest in this gem, but I have no hurry , I will only have time to actually use it next year :P

@rdp
Copy link
Owner

rdp commented Nov 23, 2019

let me know when you feel ready with it :)

@darthjee
Copy link
Contributor Author

darthjee commented Nov 25, 2019

Sure, still a lot to cover. one thing though, I think I found a bug

plot = Gnuplot::Plot.new
plot.title "my title"
plot.title "My NEW Title"

plot['title']

this sounds like it should return My NEW Title while it is returning my title still

if that is the case, I know where the fix should go and can prepare a parallel PR for that

@rdp
Copy link
Owner

rdp commented Nov 25, 2019 via email

@darthjee darthjee mentioned this pull request Nov 26, 2019
@darthjee
Copy link
Contributor Author

Right now, the specs are covering 84%

There is still a lot to cover (84% is not a real metric)

Since I will go on vacation, I would merge this one and finish it in January

Also, this can help with any refactoring comming

@rdp rdp merged commit ee85b64 into rdp:master Nov 29, 2019
@rdp
Copy link
Owner

rdp commented Nov 29, 2019

Awesome, you rock!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants