Hi.
When I try to inspect example metadata, for some reason it raises the
encoding compatibility exception.
describe RSpec::Core::Metadata do
describe '#inspect' do
it 'raises Encoding::CompatibilityError' do
expect {
example.metadata.inspect
}.to raise_error(Encoding::CompatibilityError)
end
end
describe '#to_s' do
it 'raises Encoding::CompatibilityError' do
expect {
example.metadata.to_s
}.to raise_error(Encoding::CompatibilityError)
end
end
end
$ rspec metadata_spec.rb
..
Finished in 0.00128 seconds
2 examples, 0 failures
It raises nothing if I use the $ ruby ...
instead of $ rspec ...
command.
What is the reason of this bug? How can I fix it?
Thanks.
Debian GNU/Linux 6.0.1;
Ruby 1.9.2p0;
RSpec 2.5.1.