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 unit tests #131

Merged
merged 1 commit into from Oct 28, 2016

Conversation

Projects
None yet
3 participants
@vjeffrey
Collaborator

vjeffrey commented Oct 28, 2016

This commit adds more testing!

A few of them I couldn't get to work correctly....

@binamov binamov added the in progress label Oct 28, 2016

files/default/audit_report.rb Outdated
@@ -15,15 +15,16 @@ def report
interval_enabled = node['audit']['interval']['enabled']
interval_time = node['audit']['interval']['time']
report_file = node['audit']['output']
test_array = node['audit']['profiles']

This comment has been minimized.

@chris-rock

chris-rock Oct 28, 2016

Collaborator

Is profiles maybe a better name? I was thinking about an array of single tests first

This comment has been minimized.

@vjeffrey

vjeffrey Oct 28, 2016

Collaborator

yup! 👍

spec/unit/libraries/default_spec.rb Outdated
@@ -20,6 +20,9 @@
require 'spec_helper'

This comment has been minimized.

@chris-rock

chris-rock Oct 28, 2016

Collaborator

We may should rename the spec to visibility_spec.rb. Do we intent to add more specs for other reporters?

This comment has been minimized.

@vjeffrey

vjeffrey Oct 28, 2016

Collaborator

yup, i'll move everything to its own spot

@chris-rock chris-rock changed the title from add tests to Add unit tests Oct 28, 2016

spec/unit/libraries/compliance_spec.rb Outdated
require_relative '../../../libraries/collector_classes'
# TODO: can't get this to work: `# ./libraries/collector_classes.rb:251:in `node_info'`
# need to figure out how to mock the run context

This comment has been minimized.

@vjeffrey

vjeffrey Oct 28, 2016

Collaborator

:( can't figure out how to mock the run context..is there another way around this?

This comment has been minimized.

@chris-rock

chris-rock Oct 28, 2016

Collaborator

The solution is the removal of the run context. I'll work on a PR to cover that

This comment has been minimized.

@vjeffrey

vjeffrey Oct 28, 2016

Collaborator

thank you!!

@chris-rock chris-rock added this to the 2.0 milestone Oct 28, 2016

add tests
Signed-off-by: Victoria Jeffrey <vjeffrey@chef.io>

@chris-rock chris-rock merged commit 0fae37c into master Oct 28, 2016

2 checks passed

DCO This commit has a DCO Signed-off-by
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@chris-rock chris-rock deleted the vj/add-tests branch Oct 28, 2016

@binamov binamov removed the in progress label Oct 28, 2016

@chris-rock

This comment has been minimized.

Collaborator

chris-rock commented Oct 28, 2016

This fixes #128

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