On Oct 13, 2011, at 9:43 PM, slavix wrote:
> strange install related problems in my rails 3.1 app
> gemfile
> group :test, :development do
> ..
> gem "rspec"
> gem "rspec-rails"
> gem 'rspec-rails-ext'
> gem 'rspec-rails-matchers'
> ..
> end
>
>>> bundle show rspec-rails
> /home/slava/.rvm/gems/ruby-1.9.2-p290/gems/rspec-rails-1.3.2
You need RSpec 2+, not RSpec 1 (which does not work with Rails 3).
>
>>> rails generate rspec:install
> Could not find generator rspec:install.
>
> spec_helper file i created manually
>
> ENV["RAILS_ENV"] ||= 'test'
> require File.expand_path("../../config/environment", __FILE__)
> require 'rspec/rails'
> require 'remarkable/active_record'
>
> Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
>
>
> RSpec.configure do |config|
> config.mock_with :rspec
> config.use_transactional_fixtures = true
> end
>
> RSpec::Matchers.define :have_valid_factory do |factory_name|
> match do |model|
> Factory(factory_name).new_record?.should be_false
> end
> end
>
> Trying to run rspec on my models I get loading error for rspec-rails
> and rspec generator seems missing..
>
>
>
> _______________________________________________
> rspec-users mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/rspec-users
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users