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

Add Faker::ElectricalComponents #799

Merged
merged 14 commits into from
Jun 11, 2018

Conversation

bheim6
Copy link
Contributor

@bheim6 bheim6 commented Jan 17, 2017

Hello, please review this PR for adding an assortment of electrical components to the Faker code base. I have included three methods or 'categories' of electrical components: active, passive, and electromechanical. Tests have been added and are passing; documentation has been added to reflect the categories with examples of each in the docs.

module Faker
class ElectricalComponents < Base
flexible :electrical_components
def active
Copy link
Contributor

Choose a reason for hiding this comment

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

With the flexible key above, can these methods be removed and the tests still pass?

Copy link
Contributor Author

@bheim6 bheim6 Jan 18, 2017

Choose a reason for hiding this comment

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

No they can not, I get NoMethodError: undefined method []' for nil:NilClass`` errors for each method if they are not present. I included this code because an error message from the test suite prompted me to: warning: instance variable @flexible_key not initialized.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@vbrazo vbrazo changed the title Bheim6 electrical component spike Add Faker::ElectricalComponents Jun 11, 2018
@vbrazo vbrazo merged commit 15d2cf4 into faker-ruby:master Jun 11, 2018
@vbrazo vbrazo self-requested a review July 19, 2018 01:21
davidmorton0 pushed a commit to davidmorton0/faker that referenced this pull request Jul 12, 2021
* test setup added for electrical components, test is included in test utput when running rake task, all tests pass

* add require path to faker.rb, add elec component file in faker/, test assertion for active class added, implementation in progress

* test passes for active method, more additions to come

* add Electrical Components - active  to docs

* passive test passing, add passive components to en.yml

* add docs for passive

* add test and functionality for electromechanical components, all tests pass

* add docs for electromechanical

* remove unnecessary class << self code

* fix spacing and indentation

* Update changelog.md

* Update readme.md

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

Successfully merging this pull request may close these issues.

3 participants