Sha256: eb16bdc83bb70d3c00d388ae07697b3e68d09bc0478c3470240a534b2e97ff13

Contents?: true

Size: 311 Bytes

Versions: 5

Compression:

Stored size: 311 Bytes

Contents

# Checks whether a mult-line text contains a specific number
# of lines that start with a given sequence.
def assert_lines_starting_with(text, number, start_with)
	number = number.to_i if number.is_a? String
	count = text.split("\n").count { |line| line.start_with? start_with }
	expect(count).to eq number
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
create_changelog-1.4.3 features/support/assertions.rb
create_changelog-1.4.2 features/support/assertions.rb
create_changelog-1.4.1 features/support/assertions.rb
create_changelog-1.3.2 features/support/assertions.rb
create_changelog-1.3.1 features/support/assertions.rb