kbl/codebar — Issue #6: Spec failure
Author: sandal
Created: 2012-01-30 18:44:05+00:00
State: open

```
$ rake spec
/Users/seacreature/.rvm/rubies/ruby-1.9.3-p0/bin/ruby -S rspec ./spec/lib/codebar/barcode_spec.rb ./spec/lib/codebar/image/extractor_spec.rb ./spec/lib/codebar/standard/ean13/bars_spec.rb ./spec/lib/codebar/standard/ean13/code_spec.rb
/Users/seacreature/devel/rmu/s10/marcin/codebar/spec/spec_helper.rb:5: warning: already initialized constant Logger
Run options: include {:focus=>true}

All examples were filtered out; ignoring {:focus=>true}
...F......

Failures:

1) Codebar::Barcode should properly decode barcode, example #3
Failure/Error: b.decode.should == '5901234123457'
TypeError:
can't convert nil into String
# ./lib/codebar/standard/ean13/code.rb:99:in `+'
# ./lib/codebar/standard/ean13/code.rb:99:in `block in decode'
# ./lib/codebar/standard/ean13/code.rb:98:in `each'
# ./lib/codebar/standard/ean13/code.rb:98:in `each_slice'
# ./lib/codebar/standard/ean13/code.rb:98:in `decode'
# ./lib/codebar/standard/ean13/code.rb:82:in `initialize'
# ./lib/codebar/barcode.rb:8:in `new'
# ./lib/codebar/barcode.rb:8:in `block in '
# ./lib/codebar/barcode.rb:26:in `call'
# ./lib/codebar/barcode.rb:26:in `decode'
# ./spec/lib/codebar/barcode_spec.rb:33:in `block (2 levels) in '

Finished in 1.08 seconds
10 examples, 1 failure

Failed examples:

rspec ./spec/lib/codebar/barcode_spec.rb:31 # Codebar::Barcode should properly decode barcode, example #3
rake aborted!
/Users/seacreature/.rvm/rubies/ruby-1.9.3-p0/bin/ruby -S rspec ./spec/lib/codebar/barcode_spec.rb ./spec/lib/codebar/image/extractor_spec.rb ./spec/lib/codebar/standard/ean13/bars_spec.rb ./spec/lib/codebar/standard/ean13/code_spec.rb failed

Tasks: TOP => spec
```