Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:SciMed/temptd

  • Loading branch information...
commit 842ef047bfa31c0a2597bf13c178a4c4a2f4d59a 2 parents cfa4e49 + 281ef30
Michael Simpson mjs2600 authored
Showing with 84 additions and 1 deletion.
  1. +1 −0  Gemfile
  2. +6 −0 Gemfile.lock
  3. +77 −0 Guardfile
  4. +0 −1  spec/spec_helper.rb
1  Gemfile
View
@@ -44,6 +44,7 @@ group :development, :test do
gem 'faker'
gem "mailcatcher"
gem "rspec-rails", "~> 2.0"
+ gem 'factory_girl_rails'
end
group :development do
6 Gemfile.lock
View
@@ -84,6 +84,11 @@ GEM
eventmachine (1.0.0)
execjs (1.4.0)
multi_json (~> 1.0)
+ factory_girl (4.1.0)
+ activesupport (>= 3.0.0)
+ factory_girl_rails (4.1.0)
+ factory_girl (~> 4.1.0)
+ railties (>= 3.0.0)
faker (1.1.2)
i18n (~> 0.5)
ffi (1.1.5)
@@ -260,6 +265,7 @@ DEPENDENCIES
cucumber-rails
debugger
devise
+ factory_girl_rails
faker
guard
guard-coffeescript
77 Guardfile
View
@@ -0,0 +1,77 @@
+# A sample Guardfile
+# More info at https://github.com/guard/guard#readme
+
+
+guard 'spork', :wait => 40, :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
+ watch('config/application.rb')
+ watch('config/environment.rb')
+ watch(%r{^config/environments/.+\.rb$})
+ watch(%r{^config/initializers/.+\.rb$})
+ watch('Gemfile')
+ watch('Gemfile.lock')
+ watch('spec/spec_helper.rb') { :rspec }
+ watch('test/test_helper.rb') { :test_unit }
+ watch(%r{features/support/}) { :cucumber }
+end
+
+
+# :all_on_start => false prevents rspec from running all the specs when guard starts
+# that is what rake spec (or rake) is for
+#
+guard 'rspec', :version => 2, :cli => '--drb', :all_on_start => false do
+ watch(%r{^spec/.+_spec\.rb})
+ watch(%r{^lib/(.+)\.rb}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch('spec/spec_helper.rb') { "spec" }
+
+ # Rails example
+ watch('spec/spec_helper.rb') { "spec" }
+ watch('config/routes.rb') { "spec/routing" }
+ watch('app/controllers/application_controller.rb') { "spec/controllers" }
+ watch(%r{^spec/.+_spec\.rb})
+ watch(%r{^app/(.+)\.rb}) { |m| "spec/#{m[1]}_spec.rb" }
+ watch(%r{^lib/(.+)\.rb}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch(%r{^app/controllers/(.+)_(controller)\.rb}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
+
+ # this runs specs after factories.rb is updated
+ watch(%r{^spec/factories\.rb$}) { "spec" }
+ watch(%r{^spec/factories/(.+)_factory\.rb$}) do |m|
+ ["spec/models/#{m[1]}_spec.rb",
+ "spec/controllers/#{m[1].pluralize}_controller_spec.rb",
+ "spec/requests/#{m[1].pluralize}_spec.rb"]
+ end
+end
+
+# # Cucumber also has the :all_on_start option
+# #
+# cucumber_cli = if ENV["FOCUS_CUCUMBER"]
+# "--drb -pfocus"
+# else
+# "--drb"
+# end
+# guard 'cucumber', :cli => cucumber_cli, :all_on_start => false do
+# watch(%r{features/.+\.feature})
+# watch(%r{features/support/.+}) { 'features' }
+# if ENV["FOCUS_CUCUMBER"]
+# puts "**** Ignoring changes to step definitions"
+# else
+# watch(%r{features/step_definitions/(.+)_steps\.rb}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
+# end
+# end
+#
+# # watch for changes in the app/coffeescripts directory and send compiled javascript to public/javascripts/compiled
+# # This does for test environments what barista does for other environments
+# guard 'coffeescript', :output => 'public/javascripts/compiled' do
+# watch(%r{^app/coffeescripts/(.*)\.coffee})
+# end
+#
+# # watch for changes in jasmine specs written in coffeescript and send compiled javascript to spec/javascripts
+# guard 'coffeescript', :output => 'spec/javascripts' do
+# watch(%r{^spec/coffeescripts/(.*)\.coffee})
+# end
+#
+# # the :apply_js_live => false gets passed on to livereload
+# # It causes the whole page to be reloaded when javascript changes,
+# guard 'livereload', :apply_js_live => false do
+# watch(%r{^spec/javascripts/.+\.js$})
+# watch(%r{^public/javascripts/compiled/.+\.js$})
+# end
1  spec/spec_helper.rb
View
@@ -9,7 +9,6 @@
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
# require 'factories'
- require File.expand_path("../../features/support/ldms_env", __FILE__)
# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Please sign in to comment.
Something went wrong with that request. Please try again.