Skip to content
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

Remove repeated @cinstances variable #423

Merged
merged 1 commit into from
Jan 2, 2019

Conversation

Martouta
Copy link
Contributor

@Martouta Martouta commented Dec 14, 2018

It uses the @applications instead 😄
The only places in views where this is used is:
image

@Martouta Martouta self-assigned this Dec 14, 2018
@Martouta Martouta changed the title [WIP] Remove repeated @cinstance variable Remove repeated @cinstance variable Dec 18, 2018
@Martouta Martouta requested review from avilatusell, a team, hallelujah, macejmic and guicassolato and removed request for avilatusell and a team December 18, 2018 10:08
@Martouta Martouta force-pushed the remove-unused-repeated-cinstance-variable branch from 2ea7a9c to 01ea8c4 Compare January 2, 2019 11:22
@codecov
Copy link

codecov bot commented Jan 2, 2019

Codecov Report

Merging #423 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #423      +/-   ##
==========================================
- Coverage   92.72%   92.72%   -0.01%     
==========================================
  Files        2341     2341              
  Lines       75549    75548       -1     
==========================================
- Hits        70055    70054       -1     
  Misses       5494     5494
Impacted Files Coverage Δ
...rollers/developer_portal/buyer/stats_controller.rb 93.54% <ø> (-0.21%) ⬇️
...al/developer_portal/buyer/stats_controller_test.rb 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update afcdbbe...6c9f8c1. Read the comment docs.

@@ -53,7 +53,7 @@ def setup
get :index

doc = Nokogiri::HTML.parse(response.body)
assert_equal [@live_app1, @live_app2], @controller.instance_variable_get('@cinstances')
assert_equal [@live_app1, @live_app2], @controller.instance_variable_get('@applications')
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know, I am not adding any test, just removing the unused variable and changing the super old test for the variable that we are actually using 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

Use assigns at least to get rid of the ugly instance_variable_get

@Martouta Martouta force-pushed the remove-unused-repeated-cinstance-variable branch from 01ea8c4 to 6c9f8c1 Compare January 2, 2019 11:53
@Martouta Martouta merged commit 7f895ef into master Jan 2, 2019
@Martouta Martouta deleted the remove-unused-repeated-cinstance-variable branch January 2, 2019 12:07
@Martouta Martouta changed the title Remove repeated @cinstance variable Remove repeated @cinstances variable Jan 2, 2019
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