[rspec-users] Rspec2 for rails 2.3.8?

Radhesh Kamath lists at ruby-forum.com
Fri Feb 25 17:19:56 EST 2011


Craig Demyanovich wrote in post #983991:
> On Fri, Feb 25, 2011 at 4:30 PM, Radhesh Kamath
> <lists at ruby-forum.com>wrote:
>
>> Which version of rspec-rails should I use for Rails 2.3.8?
>
>
> rspec-rails 1.3.3 is currently the latest release for Rails 2.3.x.
>

I am getting this error with my current setup, which I think, should not
happen:

     Failure/Error: non_uniq_agg.should have(2).errors_on(:name)
     NoMethodError:
       undefined method `errors_on' for #<Aggregate:0x383fe1aa>

where 'Aggregate' is a model I am testing.

My gem list looks like so:

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (2.3.8)
actionpack (2.3.8)
activerecord (2.3.8)
activerecord-jdbc-adapter (1.1.1)
activerecord-jdbcmysql-adapter (1.1.1)
activeresource (2.3.8)
activesupport (2.3.8)
backports (1.18.2)
bouncy-castle-java (1.5.0145.2)
builder (2.1.2)
columnize (0.3.1)
diff-lcs (1.1.2)
erubis (2.6.6)
facets (2.9.1)
i18n (0.4.0)
ipaddress (0.7.0)
jdbc-mysql (5.1.13)
jruby-openssl (0.7.3)
macaddr (1.0.0)
rack (1.2.1, 1.1.0)
rack-mount (0.6.13)
rack-test (0.5.7)
rails (2.3.8)
rake (0.8.7)
rspec (2.5.0, 1.3.1)
rspec-core (2.5.1)
rspec-expectations (2.5.0)
rspec-mocks (2.5.0)
rspec-rails (1.3.3)
ruby-debug (0.10.3)
ruby-debug-base (0.10.3.2)
sources (0.0.1)
thor (0.14.6)
tzinfo (0.3.24)
uuid (2.3.1)

And my spec_helper looks like so:

ENV["RAILS_ENV"] ||= 'development'
require File.expand_path("../../config/environment", __FILE__)

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}

RSpec.configure do |config|
  # == Mock Framework
  #
  # If you prefer to use mocha, flexmock or RR, uncomment the
appropriate line:
  #
  # config.mock_with :mocha
  # config.mock_with :flexmock
  # config.mock_with :rr
  config.mock_with :rspec

  # Remove this line if you're not using ActiveRecord or ActiveRecord
fixtures
  #config.fixture_path = "#{::Rails.root}/spec/fixtures"

  # If you're not using ActiveRecord, or you'd prefer not to run each of
your
  # examples within a transaction, remove the following line or assign
false
  # instead of true.
  #config.use_transactional_fixtures = true
end

Is there something else I should be including?

> Regards,
> Craig

-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list