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

[dev.icinga.com #12724] RSpec tests without effect #109

Closed
icinga-migration opened this issue Sep 14, 2016 · 4 comments
Closed

[dev.icinga.com #12724] RSpec tests without effect #109

icinga-migration opened this issue Sep 14, 2016 · 4 comments
Labels
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/12724

Created by bsheqa on 2016-09-14 09:26:06 +00:00

Assignee: bsheqa
Status: Closed (closed on 2016-09-15 14:19:10 +00:00)
Target Version: v0.3.0
Last Update: 2016-09-15 19:19:06 +00:00 (in Redmine)


We use the following test for multiple classes:

    context "#{os} with host => foo (not a valid IP address)" do
      let(:params) { {:host => 'foo'} }

      it do
        expect {
          is_expected.to contain_icinga2__feature('graphite')
        }.to raise_error(Puppet::Error, /"foo" is not a valid IP address/)
      end
    end

where this line has no effect at all:

 is_expected.to contain_icinga2__feature('graphite')

My suggestion is to remove the 'contain_icinga2__feature' check where only params are tested

    context "#{os} with host => foo (not a valid IP address)" do
      let(:params) { {:host => 'foo'} }

      it { is_expected.to raise_error(Puppet::Error, /"foo" is not a valid IP address/) }
      end
    end
@icinga-migration
Copy link
Author

Updated by lbetz on 2016-09-15 08:40:27 +00:00

Works correctly, but it seems to be the old syntax.

@icinga-migration
Copy link
Author

Updated by bsheqa on 2016-09-15 13:41:16 +00:00

  • Status changed from Feedback to Assigned
  • Assigned to set to bsheqa

@icinga-migration
Copy link
Author

Updated by bsheqa on 2016-09-15 14:19:10 +00:00

  • Status changed from Assigned to Closed
  • Done % changed from 0 to 100

@icinga-migration
Copy link
Author

Updated by lbetz on 2016-09-15 19:19:06 +00:00

  • Done % changed from 100 to 90

Forgot spec/define/feature_spec.rb.

And check all othe specs again.

@icinga-migration icinga-migration added this to the v0.3.0 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant