Sha256: f8d0eaf64d0a75ae021849e520f860d7b491735320aeedc1172ee4eab13dad5e
Contents?: true
Size: 980 Bytes
Versions: 1
Compression:
Stored size: 980 Bytes
Contents
# encoding: utf-8 require 'spec_helper' require 'tbpgr_utils' describe Numeric do context :ascii? do cases = [ { case_no: 1, case_title: '1 case', input: 1, expected: true }, { case_no: 2, case_title: '127 case', input: 127, expected: true }, { case_no: 3, case_title: '128 case', input: 128, expected: false } ] cases.each do |c| it "|case_no=#{c[:case_no]}|case_title=#{c[:case_title]}" do begin case_before c # -- given -- # nothing # -- when -- actual = c[:input].ascii? # -- then -- expect(actual).to eq(c[:expected]) ensure case_after c end end def case_before(c) # implement each case before end def case_after(c) # implement each case after end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tbpgr_utils-0.0.151 | spec/open_classes/numeric/is_ascii_spec.rb |