andrea longhi
2010-May-03 11:06 UTC
[rspec-users] Error: can''t convert Rspec::Mocks::Mock to String
Hello *, I started today to test rspec current beta with ruby 1.9.2 and rails 3.0. I created a basic app with a scaffold. I am experiencing a lot of failures in the geneated controller spec. I am pasting the complete error string: can''t convert Rspec::Mocks::Mock to String (Rspec::Mocks::Mock#to_str gives Rspec::Mocks::Mock) This is my current rspec gems setup: rspec (2.0.0.beta.8) rspec-core (2.0.0.beta.8) rspec-expectations (2.0.0.beta.8) rspec-mocks (2.0.0.beta.8) rspec-rails (2.0.0.beta.8) Of course no error is raised using ruby 1.9.1 or 1.8.7 Am I missing something? regards Andrea
David Chelimsky
2010-May-03 12:14 UTC
[rspec-users] Error: can''t convert Rspec::Mocks::Mock to String
On May 3, 2010, at 6:06 AM, andrea longhi wrote:> Hello *, > I started today to test rspec current beta with ruby 1.9.2 and rails > 3.0. I created a basic app with a scaffold. I am experiencing a lot of > failures in the geneated controller spec. I am pasting the complete > error string: > > can''t convert Rspec::Mocks::Mock to String (Rspec::Mocks::Mock#to_str > gives Rspec::Mocks::Mock) > > This is my current rspec gems setup: > > rspec (2.0.0.beta.8) > rspec-core (2.0.0.beta.8) > rspec-expectations (2.0.0.beta.8) > rspec-mocks (2.0.0.beta.8) > rspec-rails (2.0.0.beta.8) > > Of course no error is raised using ruby 1.9.1 or 1.8.7 > Am I missing something? > > regards > AndreaI see the same error (hadn''t run against 1.9.2 in a while). Reported to http://github.com/rspec/rspec-rails/issues/issue/41 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20100503/fb2e5b4b/attachment.html>
andrea longhi
2010-May-03 13:22 UTC
[rspec-users] Error: can''t convert Rspec::Mocks::Mock to String
On 3 Mag, 14:14, David Chelimsky <dchelim... at gmail.com> wrote:> I see the same error (hadn''t run against 1.9.2 in a while). Reported tohttp://github.com/rspec/rspec-rails/issues/issue/41Thanks David. I added this to my spec_helper.rb file Rspec::Mocks::Mock.module_eval do alias to_str to_s end and now it seems to work properly with no side effects, at least for now regards Andrea