Hello World from OSS Silicon Valley


HowToUse/RubyOnRails/4.2/RSpec/3.4

_ Prerequisite

_ Install&Setup

Step.1
Edit Gemfile.
group :development, :test do
  gem 'rspec-rails'
end
Step.2
Install rspec-rails.
$ bundle install

_ HowToUse

Step.1
Generate spec files.
$ rails generate rspec:install
Step.2
For integration test, you need to add the following configurations in spec_helper.rb as below.
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
config.infer_spec_type_from_file_location!

You can refer sample from here

Step.3
Prepare spec file.

You can refer sample from here

Step.4
Execute rspec.
$ rspec

_ Author

S.Yatsuzuka

Last-modified: 2016-06-25 (Sat) 21:09:28 (2873d)