Skip to content

Instantly share code, notes, and snippets.

@vinyar
Created August 21, 2014 23:04
Show Gist options
  • Save vinyar/a1630f3c89267f93a2a9 to your computer and use it in GitHub Desktop.
Save vinyar/a1630f3c89267f93a2a9 to your computer and use it in GitHub Desktop.
rspec failing on windows against recipe with Multibyte chars
Test:
it "executes dummy command" do
expect(chef_run).to run_execute('random hiragana 料').with_command('puts 料理長')
end
Other notes:
Cookbook upload works fine with Japanese in all parts of the cookbook.
Failure:
C:\chef_system\bugs\ascii_knife_upload_on_windows\cookbooks\ascii>rspec
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1058:in `load': C:/ch
ef_system/bugs/ascii_knife_upload_on_windows/cookbooks/ascii/spec/unit/recipes/default_spec.rb:30: invalid multibyte cha
r (US-ASCII) (SyntaxError)
C:/chef_system/bugs/ascii_knife_upload_on_windows/cookbooks/ascii/spec/unit/recipes/default_spec.rb:30: invalid multibyt
e char (US-ASCII)
C:/chef_system/bugs/ascii_knife_upload_on_windows/cookbooks/ascii/spec/unit/recipes/default_spec.rb:30: syntax error, un
expected $end, expecting ')'
...run_execute('random hiragana æ-T').with_command('puts æ-Tç?+...
... ^
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1058:in
`block in load_spec_files'
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1058:in
`each'
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1058:in
`load_spec_files'
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:97:in `setup'
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:85:in `run'
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:70:in `run'
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:38:in `invoke'
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/rspec-core-3.0.4/exe/rspec:4:in `<top (required)>'
from C:/opscode/chef/embedded/bin/rspec:23:in `load'
from C:/opscode/chef/embedded/bin/rspec:23:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment