[rspec-users] running rspec causes errror => no such file to load -- rspec/rails

slavix mikerin.slava at gmail.com
Thu Oct 13 23:43:26 EDT 2011


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

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





More information about the rspec-users mailing list