From 9cc56f43c95e767772a411be0c0267508d1ab46b Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Fri, 23 Nov 2018 01:15:08 +0500 Subject: [PATCH] Add dummy specs --- .gitignore | 7 ++++--- config/routes.rb | 2 +- spec/requests/default_spec.rb | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 spec/requests/default_spec.rb diff --git a/.gitignore b/.gitignore index 181b212..0e6ca9a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ # git config --global core.excludesfile '~/.gitignore_global' # Ignore bundler config. -/.bundle +/.bundle/ # Ignore all logfiles and tempfiles. /log/* @@ -21,8 +21,9 @@ /node_modules /yarn-error.log -/public/assets -.byebug_history +/public/assets/ +/.byebug_history +/.rake_tasks~ # Ignore master key for decrypting credentials and more. /config/master.key diff --git a/config/routes.rb b/config/routes.rb index 47cc16e..07f39fe 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true Rails.application.routes.draw do - # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html + root to: ->(_) { [200, {}, ['Hello, World!']] } end diff --git a/spec/requests/default_spec.rb b/spec/requests/default_spec.rb new file mode 100644 index 0000000..9783585 --- /dev/null +++ b/spec/requests/default_spec.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe 'GET /' do + before do + get '/' + end + + specify do + expect(response).to have_http_status :ok + end + + specify do + expect(response.body).to match 'Hello, World!' + end +end