johnbintz/jasmine-headless-webkit — Issue #81: Encoding::UndefinedConversionError
Author: pjg
Created: 2011-11-18 10:33:19+00:00
State: open

```bash
$ xvfb-run jasmine-headless-webkit -c
Running Jasmine specs...
[jasmine-headless-webkit] U+015A from UTF-8 to US-ASCII (Encoding::UndefinedConversionError)
/home/jkl/.rvm/gems/ruby-1.9.2-p290/gems/jasmine-headless-webkit-0.7.3.1/lib/jasmine/headless/spec_file_analyzer.rb:17:in `encode!'
/home/jkl/.rvm/gems/ruby-1.9.2-p290/gems/jasmine-headless-webkit-0.7.3.1/lib/jasmine/headless/spec_file_analyzer.rb:17:in `action'
/home/jkl/.rvm/gems/ruby-1.9.2-p290/gems/jasmine-headless-webkit-0.7.3.1/lib/jasmine/headless/cacheable_action.rb:48:in `handle'
/home/jkl/.rvm/gems/ruby-1.9.2-p290/gems/jasmine-headless-webkit-0.7.3.1/lib/jasmine/headless/cacheable_action.rb:33:in `for'
/home/jkl/.rvm/gems/ruby-1.9.2-p290/gems/jasmine-headless-webkit-0.7.3.1/lib/jasmine/files_list.rb:48:in `block in spec_file_line_numbers'
/home/jkl/.rvm/gems/ruby-1.9.2-p290/gems/jasmine-headless-webkit-0.7.3.1/lib/jasmine/files_list.rb:46:in `collect'
/home/jkl/.rvm/gems/ruby-1.9.2-p290/gems/jasmine-headless-webkit-0.7.3.1/lib/jasmine/files_list.rb:46:in `spec_file_line_numbers'
/home/jkl/.rvm/gems/ruby-1.9.2-p290/gems/jasmine-headless-webkit-0.7.3.1/lib/jasmine/headless/template_writer.rb:21:in `block (2 levels) in write!'
/home/jkl/.rvm/gems/ruby-1.9.2-p290/gems/jasmine-headless-webkit-0.7.3.1/lib/jasmine/headless/template_writer.rb:21:in `open'
/home/jkl/.rvm/gems/ruby-1.9.2-p290/gems/jasmine-headless-webkit-0.7.3.1/lib/jasmine/headless/template_writer.rb:21:in `block in write!'
/home/jkl/.rvm/gems/ruby-1.9.2-p290/gems/jasmine-headless-webkit-0.7.3.1/lib/jasmine/headless/template_writer.rb:20:in `each'
/home/jkl/.rvm/gems/ruby-1.9.2-p290/gems/jasmine-headless-webkit-0.7.3.1/lib/jasmine/headless/template_writer.rb:20:in `write!'
/home/jkl/.rvm/gems/ruby-1.9.2-p290/gems/jasmine-headless-webkit-0.7.3.1/lib/jasmine/headless/runner.rb:74:in `run'
/home/jkl/.rvm/gems/ruby-1.9.2-p290/gems/jasmine-headless-webkit-0.7.3.1/bin/jasmine-headless-webkit:22:in `'
/home/jkl/.rvm/gems/ruby-1.9.2-p290/bin/jasmine-headless-webkit:19:in `load'
/home/jkl/.rvm/gems/ruby-1.9.2-p290/bin/jasmine-headless-webkit:19:in `

'
```

When I run the same spec using `0.6.3` it passes:

```bash
$ gem list | grep jasmine
guard-jasmine-headless-webkit (0.3.2, 0.2.0)
jasmine-core (1.2.0.rc1, 1.1.0.rc4)
jasmine-headless-webkit (0.6.3)

$ xvfb-run jasmine-headless-webkit -c
Running Jasmine specs...
............................................
PASS: 44 tests, 0 failures, 0.028 secs.
```

The offending spec (I believe) is this one:

```javascript
it("translates the phrase for the 'pl' locale", function() {
I18n.locale = "pl"
expect(I18n.translate("world")).toEqual("Świat")
})
```

Here's the source: https://github.com/Exvo/exvo_globalize/blob/master/spec/javascripts/exvo_globalize_i18n_spec.js