Posts

Showing posts with the label rspec test

An error occurred while installing rmagick (2.16.0), and Bundler cannot continue

An error occurred while installing rmagick (2.16.0), and Bundler cannot continue You have to install library of rmagick in your system. sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev

NoMethodError: undefined method `has_many?'

NoMethodError: undefined method `has_many?' In your gem file-  group :test do     gem 'capybara', '~> 2.1.0'     gem 'shoulda-matchers', '~> 3.0' end Run - bundle install in your spec_helper-  Shoulda::Matchers.configure do |config|   config.integrate do |with|     with.test_framework :rspec     with.library :rails   end end In to do TodoItem model require 'spec_helper' describe TodoItem do   it { should belong_to(:todo_list) } end In to do TodoList Model require 'spec_helper' describe TodoList do   it { should have_many(:todo_items) } end