Skip to content

Commit ff63455

Browse files
authored
Merge pull request #777 from alexjfisher/fix_test_filenames
Fix filenames of two function spec tests
2 parents e66f7aa + 2220810 commit ff63455

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

lib/puppet/functions/length.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
dispatch :length do
44
param 'Variant[String,Array,Hash]', :value
55
end
6-
def length(value)
6+
def length(value)
77
if value.is_a?(String)
88
result = value.length
99
elsif value.is_a?(Array) || value.is_a?(Hash)

spec/functions/length.rb renamed to spec/functions/length_spec.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@
2626
it { is_expected.to run.with_params('āβćđ').and_return(4) }
2727

2828
context 'when using a class extending String' do
29-
it 'should call its size method' do
30-
value = AlsoString.new('asdfghjkl')
31-
value.expects(:length).returns('foo')
32-
expect(subject).to run.with_params(value).and_return('foo')
33-
end
29+
it { is_expected.to run.with_params(AlsoString.new('asdfghjkl')).and_return(9) }
3430
end
3531
end

0 commit comments

Comments
 (0)