From 1f3620a3de1d5bde09fdd5429299edf05bdc1ad9 Mon Sep 17 00:00:00 2001 From: Michael McCabe Date: Thu, 5 Sep 2013 16:50:29 -0400 Subject: [PATCH] adding rspec and auto test runs --- Gemfile | 7 +++++++ Gemfile.lock | 9 +++++++++ Guardfile | 6 ++++++ test/functional/users_controller_test.rb | 6 +----- test/unit/benefits_test.rb | 5 ----- 5 files changed, 23 insertions(+), 10 deletions(-) diff --git a/Gemfile b/Gemfile index c79f2f8..e425a6d 100755 --- a/Gemfile +++ b/Gemfile @@ -25,6 +25,9 @@ group :development, :test do gem 'rspec-rails' end +group :test do + gem 'rspec' +end # Gems used only for assets and not required # in production environments by default. @@ -52,9 +55,13 @@ gem 'jquery-rails' # Pow related gem gem 'powder' +<<<<<<< HEAD gem 'aruba' gem 'minitest', '~> 4.0', :require=> "minitest/autorun" +======= +#gem 'minitest' +>>>>>>> adding rspec and auto test runs # Deploy with Capistrano # gem 'capistrano' diff --git a/Gemfile.lock b/Gemfile.lock index 698a0df..9fa3b95 100755 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -170,6 +170,14 @@ GEM rspec-core (~> 2.14.0) rspec-expectations (~> 2.14.0) rspec-mocks (~> 2.14.0) + rspec (2.14.0) + rspec-core (~> 2.14.0) + rspec-expectations (~> 2.14.0) + rspec-mocks (~> 2.14.0) + rspec-core (2.14.2) + rspec-expectations (2.14.0) + diff-lcs (>= 1.1.3, < 2.0) + rspec-mocks (2.14.1) ruby2ruby (2.0.3) ruby_parser (~> 3.1) sexp_processor (~> 4.0) @@ -230,6 +238,7 @@ DEPENDENCIES rails (= 3.2.13) rb-fsevent rspec-rails + rspec sass-rails (~> 3.2.3) sqlite3 uglifier (>= 1.0.3) diff --git a/Guardfile b/Guardfile index b3ae7e6..de27bd7 100755 --- a/Guardfile +++ b/Guardfile @@ -20,3 +20,9 @@ guard 'livereload', host: "railsgoat.dev", port: '35727' do # Rails Assets Pipeline watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" } end + +guard :shell do + watch(%r{test/unit/.+\.rb}) { system("rake")} + watch(%r{test/functional/.+\.rb}) { system("rake")} + +end \ No newline at end of file diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb index 7d2d9b1..dfbee34 100755 --- a/test/functional/users_controller_test.rb +++ b/test/functional/users_controller_test.rb @@ -1,9 +1,5 @@ require 'test_helper' class UsersControllerTest < ActionController::TestCase - test "should get new" do - get :new - assert_response :success - end -end +end \ No newline at end of file diff --git a/test/unit/benefits_test.rb b/test/unit/benefits_test.rb index 5104350..faca8c7 100644 --- a/test/unit/benefits_test.rb +++ b/test/unit/benefits_test.rb @@ -1,7 +1,2 @@ require 'test_helper' -class BenefitsTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end