instance_variables() in 1.9.2 returns symbols instead of strings, which breaks the assign_to matcher when using 1.9.2.
Fixes here: kollektiv/shoulda-matchers@713abb1
Tested with 1.8.7 and 1.9.2.
Edit: Updated commit link
Thanks for the patch. I had a couple comments on your commit - can you take a look?
I updated the commit link in this issue and added some comments. kollektiv/shoulda-matchers@713abb1
With regards to Minitest, I was wondering what would happen in an actual 1.8.7 application using Test::Unit or RSpec if MiniTest::Assertion isn't defined. The tests pass because it's defined in spec_helper, but will applications using shoulda need to define it as well?
Ah you're right, it wouldn't have worked in 1.8.7. I pushed some fixes here. Additionally, I made a small change to shoulda-context to get cucumber tests to pass in 1.9.2.
Should split out the fix for the assign_to matcher from the MiniTest break from using Test::Unit::AssertionFailedError?
I put some fixes in for the minitest: james2m/shoulda-context@ad00e58 and james2m/shoulda-matchers@a28a184
Rather than re-factoring use of Test::Unit::AssertionFailedError out of shoulda I just added this to test_unit integration;
AssertionFailedError = MiniTest::Assertion if defined?(MiniTest) && !defined?(AssertionFailedError)
Could you please release a new version, which includes this fix? You cannot really use the assign_to matcher in Ruby 1.9.2.
And it's kind of cumbersome to bundle the shoulda-matchers gem from the git repository instead of rubygems.
I just pushed beta2, which contains this fix. Thanks for your patience.