Help us understand the problem. What is going on with this article?

rake spec で spec/ 以下のテストを実行させるための最小限の設定

More than 5 years have passed since last update.

のストック代わりにメモ。

Rakefile
require "rspec/core/rake_task"

RSpec::Core::RakeTask.new("spec")
task :default => :spec
spec/spec_helper.rb
require 'rspec'

Dir["./support/**/*.rb"].each do |f|
  require f
end

RSpec.configure do |config|
end
spec/app_spec.rb
require 'spec_helper'

describe 'app_spec' do
  it {
    expect(1).to eq(1)
  }
end
Gemfile
source 'https://rubygems.org/'

gem 'rake'
gem 'rspec'
$ rake spec
$ bundle exec rake spec
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away