Commit e2b250b5 by Guillermo Guerrero Ibarra Committed by Cuong Tran

Added new gems. (#419)

* Added new gems.
parent cce4bb1d
......@@ -20,3 +20,4 @@
/spec/integration/*/db/test.*
/spec/integration/*/log/*
/spec/integration/*/tmp/*
.byebug_history
......@@ -12,11 +12,12 @@ group :development do
end
group :development, :test do
gem 'byebug'
gem 'rspec', require: false
gem 'guard-rspec', require: false
gem 'terminal-notifier-guard', require: false
gem 'simplecov', require: false
gem 'rubocop', '~> 0.39.0', require: false unless RUBY_VERSION =~ /^1.8/
gem 'rubocop', '~> 0.46.0', require: false unless RUBY_VERSION =~ /^1.8/
gem 'coveralls'
gem 'codeclimate-test-reporter'
gem 'ruby_dep', '1.3.1'
......
machine:
ruby:
version: 2.2.6
test:
override:
- bundle exec rubocop && bundle exec rspec
......@@ -32,6 +32,15 @@ describe AnnotateRoutes do
AnnotateRoutes.do_annotations
end
it 'should insert annotations if file does not contain annotations and ignore routes' do
expect(File).to receive(:read).with(ROUTE_FILE).and_return("")
expect(File).to receive(:open).with(ROUTE_FILE, 'wb').and_yield(mock_file)
expect(@mock_file).to receive(:puts).with("\n# == Route Map\n#\n")
expect(AnnotateRoutes).to receive(:puts).with(ANNOTATION_ADDED)
AnnotateRoutes.do_annotations(ignore_routes: 'my_route')
end
it 'should skip annotations if file does already contain annotation' do
expect(File).to receive(:read).with(ROUTE_FILE).and_return("\n# == Route Map\n#\n")
expect(AnnotateRoutes).to receive(:puts).with(FILE_UNCHANGED)
......
......@@ -26,6 +26,7 @@ require 'active_support/core_ext/object/blank'
require 'active_support/core_ext/class/subclasses'
require 'active_support/core_ext/string/inflections'
require 'annotate'
require 'byebug'
module Annotate
module Integration
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment