solnic/virtus — pull request #118 by indrekj (2012-10-01 16:43:13+00:00)
Title: Fix a test that failed when rspec 2 was used

RSpec1: `spec spec` => Everything OK
RSpec2: `rspec spec` =>
```
1) Virtus::InstanceMethods#initialize with an argument that responds to #to_hash sets attributes
Failure/Error: subject.name.should be(name)

expected # => #
got # => "#[RSpec::Mocks::Mock:0x11ff8a0 @name=\"name\"]"

Compared using equal?, which compares object identity,
but expected and actual are not the same object. Use
'actual.should eq(expected)' if you don't care about
object identity in this example.

Diff:
@@ -1,2 +1,2 @@
-#
+"#[RSpec::Mocks::Mock:0x11ff8a0 @name=\"name\"]"
```

I wasn't 100% sure what was exactly tested here. I tried to change it to as close to the test name as possible. Now it passes with both rspec versions.