[rspec-users] Rspec not loading fixtures

2012-03-22 Thread Pito Salas
I am taking over a code base and am trying to run the tests. I am somewhat new to RSpec so this might be a trivial problem. Basically I can tell that the fixtures are not getting loaded. All 100 tests fail with a similar error. But I don't know why. Below is the code, with my narrative with ***

[rspec-users] mocking a reference to a polymorphic model?

2012-03-22 Thread Fearless Fool
The basic question: how do you mock a reference to a polymorphic class in RSpec? Trying the obvious thing leads to an error of the form: undefined method `base_class' for Post:Class === The details: # file: app/models/relation.rb class Relation < ActiveRecord::Base belongs_to :entity, :pol

Re: [rspec-users] mocking a reference to a polymorphic model?

2012-03-22 Thread Chris Habgood
Are you really sure you need a polymorphic table? On Thu, Mar 22, 2012 at 12:27, Fearless Fool wrote: > The basic question: how do you mock a reference to a polymorphic class > in RSpec? Trying the obvious thing leads to an error of the form: > > undefined method `base_class' for Post:Class >

Re: [rspec-users] mocking a reference to a polymorphic model?

2012-03-22 Thread Matt Wynne
On 22 Mar 2012, at 17:27, Fearless Fool wrote: > The basic question: how do you mock a reference to a polymorphic class > in RSpec? Trying the obvious thing leads to an error of the form: > > undefined method `base_class' for Post:Class > > === The details: > > # file: app/models/relation.r

Re: [rspec-users] bug: rspec rails generator generates a failing spec

2012-03-22 Thread Alex Chaffee
Oops. This is apparently not an rspec bug after all... the tutorial instructions generated the StaticPages controller in a non-standard way. Sorry for the false alarm! On Thursday, March 22, 2012 2:19:04 PM UTC-7, Alex Chaffee wrote: > > Using rspec 2.9.0, rspec-rails 2.9.0, rails 3.2.2, followi

[rspec-users] bug: rspec rails generator generates a failing spec

2012-03-22 Thread Alex Chaffee
Using rspec 2.9.0, rspec-rails 2.9.0, rails 3.2.2, following Michael Hartl's RailsTutorial, version 3.2, chapter 3. Running rails generate integration_test static_pages makes a spec named static_pages_spec.rb that contains the following code get static_pages_index_path which causes this erro