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

Tests & refactor package_helper#guess_code_class #3098

Merged
merged 2 commits into from May 11, 2017

Conversation

Projects
None yet
3 participants
@Ana06
Copy link
Member

Ana06 commented May 10, 2017

I added rspec tests for package_helper#guess_code_class(filename). Property tests were used, as they are really convenient when testing regular expressions. :bowtie:

Also, I refactored package_helper#guess_code_class after adding tests.

@Ana06

This comment has been minimized.

Copy link
Member

Ana06 commented May 10, 2017

@codecov

This comment has been minimized.

Copy link

codecov bot commented May 10, 2017

Codecov Report

Merging #3098 into master will increase coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3098      +/-   ##
==========================================
+ Coverage   88.83%   88.89%   +0.06%     
==========================================
  Files         262      262              
  Lines       17588    17585       -3     
==========================================
+ Hits        15624    15633       +9     
+ Misses       1964     1952      -12
Flag Coverage Δ
#api 83.62% <0%> (+0.01%) ⬆️
#rspec 65.78% <100%> (+0.08%) ⬆️
#webui 64.22% <8.33%> (-0.27%) ⬇️
expect(guess_code_class(filename)).to eq('css')
}
end
end

This comment has been minimized.

@bgeuken

bgeuken May 10, 2017

Member

With that much duplication I would consider using a shared example here

This comment has been minimized.

@Ana06

Ana06 May 10, 2017

Member

yes, great idea! 👍

Ana06 added some commits May 9, 2017

[ci] Test package_helper#guess_code_class
Add rspec tests for `package_helper#guess_code_class(filename)`.
Property tests were used, as they are really convenient when testing
regular expressions.

@Ana06 Ana06 force-pushed the Ana06:package_helper branch from 3f406fd to b126212 May 10, 2017

@bgeuken

This comment has been minimized.

Copy link
Member

bgeuken commented May 11, 2017

👍

@bgeuken bgeuken merged commit 1553abd into openSUSE:master May 11, 2017

4 checks passed

Hakiri No security warnings were found.
Details
codecov/patch 100% of diff hit (target 88.83%)
Details
codecov/project 88.89% (+0.06%) compared to 13c8db7
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Ana06 Ana06 deleted the Ana06:package_helper branch Oct 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment