[rspec-users] Rspec2 for rails 2.3.8?

Radhesh Kamath lists at ruby-forum.com
Wed Mar 2 17:34:49 EST 2011


David Chelimsky wrote in post #984311:
> On Feb 25, 2011, at 4:19 PM, Radhesh Kamath wrote:
>
>> I am getting this error with my current setup, which I think, should not
>> *** LOCAL GEMS ***
>> bouncy-castle-java (1.5.0145.2)
>> rack (1.2.1, 1.1.0)
>> ruby-debug-base (0.10.3.2)
>> # 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|
>
> If you're using rspec-rails-1.3.3, this line ^^ should raise an error
> since the RSpec constant wasn't introduced until rspec-2.0.
>
> I'm guessing that the rails app is not correctly configured to use
> rspec-rails-1.3.3.
>
> What's in config/environment.rb? Are you using bundler? If so, what's in
> Gemfile?

Do not worry about it... I just moved to Rails 3.0.4, because I was
facing some other issues with my Rails 2.3.8 application.

I am using the following gems now, but I still get an error saying this:

Failure/Error: non_uniq_agg.should have(1).error_on(:name)
     NoMethodError:
       undefined method `error_on' for #<Aggregate:0x53ef1aa4>

There are failures for errors_on as well, which leads me to think that I
am not requiring the proper stuff still.

Here's my latest gem list:
*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.4)
actionpack (3.0.4)
activemodel (3.0.4)
activerecord (3.0.4)
activerecord-jdbc-adapter (1.1.1)
activerecord-jdbcmysql-adapter (1.1.1)
activeresource (3.0.4)
activesupport (3.0.4)
acts_as_tree_rails3 (0.1.0)
arel (2.0.9)
backports (1.18.2)
bouncy-castle-java (1.5.0145.2)
builder (2.1.2)
bundler (1.0.10)
columnize (0.3.2)
diff-lcs (1.1.2)
erubis (2.6.6)
facets (2.9.1)
glassfish (1.0.3 universal-java, 1.0.2 universal-java)
hoe (2.9.1, 2.7.0)
i18n (0.4.0)
ipaddress (0.7.0)
jdbc-mysql (5.1.13)
jruby-openssl (0.7.3, 0.7.1)
json_pure (1.4.6)
macaddr (1.0.0)
mail (2.2.15)
mime-types (1.16)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-test (0.5.7)
rails (3.0.4)
railties (3.0.4)
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 (2.5.0)
ruby-debug (0.10.4)
ruby-debug-base (0.10.4 java)
rubyforge (2.0.4)
sources (0.0.1)
SyslogLogger (1.4.0)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.24)
uuid (2.3.1)

My Ruby version:
jruby 1.6.0.RC2 (ruby 1.8.7 patchlevel 330) (2011-02-09 5434c72) (Java
HotSpot(TM) 64-Bit Server VM 1.6.0_19) [linux-amd64-java]

spec_helper.rb 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

>
>>  # Remove this line if you're not using ActiveRecord or ActiveRecord
>>
>> http://rubyforge.org/mailman/listinfo/rspec-users
> Cheers,
> David

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


More information about the rspec-users mailing list