Skip to content

Instantly share code, notes, and snippets.

@calavera
Created September 28, 2009 15:49
Show Gist options
  • Save calavera/195524 to your computer and use it in GitHub Desktop.
Save calavera/195524 to your computer and use it in GitHub Desktop.
weird behaviours running specs
* Error parsing symbols.
Some specs fail because mspec raises an error with some symbols, this is an example:
An exception occurred during: Mock.cleanup
Hash#== returns true if other Hash has the same number of keys and each key-value pair matches, even though the default-value are not same ERROR
NoMethodError: undefined method `first' for :"__mspec_14_eql?__":Symbol
/home/david/dev/rubyspec/core/hash/equal_value_spec.rb:5
/home/david/dev/rubyspec/core/hash/equal_value_spec.rb:55:in `load'
* Objects are equal when they shouldn't.
Although the code is the same for ruby 1.8 and 1.9 modes some specs fail comparing objects.
The next spec works fine in 1.8 mode but fails in 1.9 mode:
Array#replace replaces the elements with elements from other array FAILED
Expected ["a", "b", "c"]
not to be identical to ["a", "b", "c"]
/home/david/dev/rubyspec/core/array/shared/replace.rb:7
/home/david/dev/rubyspec/core/array/replace_spec.rb:5
/home/david/dev/rubyspec/core/array/replace_spec.rb:55:in `load'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment