Sha256: 42180cef216f1cd0a774d8a0eef6651e9d272c7648b9613ae901ba66b6da6abd
Contents?: true
Size: 654 Bytes
Versions: 2
Compression:
Stored size: 654 Bytes
Contents
# @!method have_output_size(output) # This matchers checks if output has size. # # @param [String] output # The content which should be checked # # @return [Boolean] The result # # false: # * if output does not have size # true: # * if output has size # # @example Use matcher # # RSpec.describe do # it { expect(file1).to have_output_size(256) } # end RSpec::Matchers.define :have_output_size do |expected| match do |actual| next false unless actual.respond_to? :size @actual = actual.size values_match? expected, @actual end description { "output has size #{description_of expected}" } end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
aruba-1.0.0.pre.alpha.4 | lib/aruba/matchers/command/have_output_size.rb |
aruba-1.0.0.pre.alpha.3 | lib/aruba/matchers/command/have_output_size.rb |