Skip to content

Fix filenames of two function spec tests #777

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

Merged
merged 1 commit into from
Sep 25, 2017

Conversation

alexjfisher
Copy link
Collaborator

These tests weren't being run. Total tests increase from 2742 to 2769.

@tphoney
Copy link
Contributor

tphoney commented Jul 7, 2017

@alexjfisher yo yo, totally agree with the rename, can you look at the failure, if not i will jump on it next week

@alexjfisher alexjfisher force-pushed the fix_test_filenames branch 2 times, most recently from 6a9b4e7 to fd9422d Compare July 10, 2017 09:28
The tests weren't being run.  Total tests increase from 2742 to 2769.

Also fix 'when using a class extending String' test.
It had been failing with...
```
RuntimeError:
       can't modify frozen AlsoString
```
@alexjfisher
Copy link
Collaborator Author

@tphoney I fixed up one of the tests and now the travis build passes. Appveyor is still failing for puppet 4.2. Looks like the error messages aren't the same for older and new versions of puppet. These are the tests that fail.

it { is_expected.to run.with_params().and_raise_error(ArgumentError, /'length' expects 1 argument, got none/) }
it { is_expected.to run.with_params([], 'extra').and_raise_error(ArgumentError, /'length' expects 1 argument, got 2/) }
it { is_expected.to run.with_params(1).and_raise_error(ArgumentError, /expects a value of type String, Array, or Hash, got Integer/) }
it { is_expected.to run.with_params(true).and_raise_error(ArgumentError, /expects a value of type String, Array, or Hash, got Boolean/) }

@@ -26,10 +26,6 @@
it { is_expected.to run.with_params('āβćđ').and_return(4) }

context 'when using a class extending String' do
it 'should call its size method' do
value = AlsoString.new('asdfghjkl')
value.expects(:length).returns('foo')
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure it ever made any sense to mock returning a string when the function should only ever return an int.

@tphoney
Copy link
Contributor

tphoney commented Jul 11, 2017

Thanks for the changes @alexjfisher ,agreed with your conclusion. I am looking into weird appveryor ness at the minute. Hopefully i will get something merged soon.

@tphoney
Copy link
Contributor

tphoney commented Sep 25, 2017

Thanks for the PR, stdlib is failing but not because of this. merging

@tphoney tphoney merged commit ff63455 into puppetlabs:master Sep 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants