Permalink
Browse files

Update spec_helper and gemfile to get spec framework set up

  • Loading branch information...
1 parent 82daf1e commit 3120ed4c673c6fa6ec8e36194a940aa385956253 Derick Hitchcock committed Nov 16, 2012
Showing with 193 additions and 44 deletions.
  1. +25 −4 Gemfile
  2. +114 −1 Gemfile.lock
  3. +8 −2 README.md
  4. +10 −0 spec/models/event_spec.rb
  5. +36 −37 spec/spec_helper.rb
View
29 Gemfile
@@ -33,11 +33,32 @@ end
group :development, :test do
gem 'debugger'
+ gem 'guard'
+ gem 'rb-fsevent'
+ gem 'guard-rspec'
+ gem 'guard-cucumber'
+ gem 'guard-coffeescript'
+ gem 'guard-livereload'
+ gem 'guard-spork'
+ gem 'spork'
+ gem 'faker'
+ gem "mailcatcher"
+ gem "rspec-rails", "~> 2.0"
+end
+
+group :development do
+ gem "rails-erd"
+ gem 'letters'
+ gem 'pry-rails'
+end
+
+
+group :test do
+ gem "cucumber-rails"
end
gem "jquery-rails"
-gem "rspec-rails", ">= 2.0.1", :group => [:development, :test]
gem 'devise'
-gem 'whenever'
-gem 'letters'
-gem 'pry-rails'
+gem 'whenever', :require => false
+gem 'will_paginate', '~> 3.0'
+
View
@@ -28,10 +28,21 @@ GEM
activesupport (3.2.8)
i18n (~> 0.6)
multi_json (~> 1.0)
+ addressable (2.3.2)
arel (3.0.2)
awesome_print (1.1.0)
bcrypt-ruby (3.0.1)
builder (3.0.4)
+ capybara (2.0.0)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ selenium-webdriver (~> 2.0)
+ xpath (~> 1.0.0)
+ childprocess (0.3.6)
+ ffi (~> 1.0, >= 1.0.6)
+ choice (0.1.6)
chronic (0.6.7)
coderay (1.0.8)
coffee-rails (3.2.2)
@@ -43,6 +54,16 @@ GEM
coffee-script-source (1.3.3)
colorize (0.5.8)
columnize (0.3.6)
+ cucumber (1.2.1)
+ builder (>= 2.1.2)
+ diff-lcs (>= 1.1.3)
+ gherkin (~> 2.11.0)
+ json (>= 1.4.6)
+ cucumber-rails (1.3.0)
+ capybara (>= 1.1.2)
+ cucumber (>= 1.1.8)
+ nokogiri (>= 1.5.0)
+ daemons (1.1.9)
debugger (1.2.1)
columnize (>= 0.3.1)
debugger-linecache (~> 1.1.1)
@@ -56,9 +77,42 @@ GEM
railties (~> 3.1)
warden (~> 1.2.1)
diff-lcs (1.1.3)
+ em-websocket (0.3.8)
+ addressable (>= 2.1.1)
+ eventmachine (>= 0.12.9)
erubis (2.7.0)
+ eventmachine (1.0.0)
execjs (1.4.0)
multi_json (~> 1.0)
+ faker (1.1.2)
+ i18n (~> 0.5)
+ ffi (1.1.5)
+ gherkin (2.11.5)
+ json (>= 1.4.6)
+ guard (1.5.4)
+ listen (>= 0.4.2)
+ lumberjack (>= 1.0.2)
+ pry (>= 0.9.10)
+ thor (>= 0.14.6)
+ guard-coffeescript (1.2.1)
+ coffee-script (>= 2.2.0)
+ guard (>= 1.1.0)
+ guard-cucumber (1.2.2)
+ cucumber (>= 1.2.0)
+ guard (>= 1.1.0)
+ guard-livereload (1.1.0)
+ em-websocket (>= 0.2.0)
+ guard (>= 1.5.0)
+ multi_json (~> 1.0)
+ guard-rspec (2.1.1)
+ guard (>= 1.1)
+ rspec (~> 2.11)
+ guard-spork (1.2.3)
+ childprocess (>= 0.2.3)
+ guard (>= 1.1)
+ spork (>= 0.8.4)
+ sys-proctable
+ haml (3.1.7)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
@@ -72,14 +126,28 @@ GEM
colorize
debugger
xml-simple
+ libwebsocket (0.1.5)
+ addressable
+ listen (0.5.3)
+ lumberjack (1.0.2)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
+ mailcatcher (0.5.10)
+ activesupport (~> 3.0)
+ eventmachine (~> 1.0.0)
+ haml (~> 3.1)
+ mail (~> 2.3)
+ sinatra (~> 1.2)
+ skinny (~> 0.2.3)
+ sqlite3 (~> 1.3)
+ thin (~> 1.5.0)
method_source (0.8.1)
mime-types (1.19)
multi_json (1.3.6)
mysql2 (0.3.11)
+ nokogiri (1.5.5)
orm_adapter (0.4.0)
polyglot (0.3.3)
pry (0.9.10)
@@ -91,6 +159,8 @@ GEM
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
+ rack-protection (1.2.0)
+ rack
rack-ssl (1.3.2)
rack
rack-test (0.6.2)
@@ -103,6 +173,11 @@ GEM
activesupport (= 3.2.8)
bundler (~> 1.0)
railties (= 3.2.8)
+ rails-erd (1.0.0)
+ activerecord (>= 3.0)
+ activesupport (>= 3.0)
+ choice (~> 0.1.6)
+ ruby-graphviz (~> 1.0.4)
railties (3.2.8)
actionpack (= 3.2.8)
activesupport (= 3.2.8)
@@ -111,6 +186,7 @@ GEM
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (0.9.2.2)
+ rb-fsevent (0.9.2)
rdoc (3.12)
json (~> 1.4)
rspec (2.11.0)
@@ -126,16 +202,37 @@ GEM
activesupport (>= 3.0)
railties (>= 3.0)
rspec (~> 2.11.0)
+ ruby-graphviz (1.0.8)
+ rubyzip (0.9.9)
sass (3.2.1)
sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
+ selenium-webdriver (2.26.0)
+ childprocess (>= 0.2.5)
+ libwebsocket (~> 0.1.3)
+ multi_json (~> 1.0)
+ rubyzip
+ sinatra (1.3.3)
+ rack (~> 1.3, >= 1.3.6)
+ rack-protection (~> 1.2)
+ tilt (~> 1.3, >= 1.3.3)
+ skinny (0.2.3)
+ eventmachine (~> 1.0.0)
+ thin (~> 1.5.0)
slop (3.3.3)
+ spork (0.9.2)
sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
+ sqlite3 (1.3.6)
+ sys-proctable (0.9.2)
+ thin (1.5.0)
+ daemons (>= 1.0.9)
+ eventmachine (>= 0.12.6)
+ rack (>= 1.0.0)
thor (0.16.0)
tilt (1.3.3)
treetop (1.4.11)
@@ -150,21 +247,37 @@ GEM
whenever (0.7.3)
activesupport (>= 2.3.4)
chronic (~> 0.6.3)
+ will_paginate (3.0.3)
xml-simple (1.1.2)
+ xpath (1.0.0)
+ nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
coffee-rails (~> 3.2.1)
+ cucumber-rails
debugger
devise
+ faker
+ guard
+ guard-coffeescript
+ guard-cucumber
+ guard-livereload
+ guard-rspec
+ guard-spork
jquery-rails
letters
+ mailcatcher
mysql2
pry-rails
rails (= 3.2.8)
- rspec-rails (>= 2.0.1)
+ rails-erd
+ rb-fsevent
+ rspec-rails (~> 2.0)
sass-rails (~> 3.2.3)
+ spork
uglifier (>= 1.0.3)
whenever
+ will_paginate (~> 3.0)
View
@@ -8,8 +8,14 @@ assume UI is there
voting: ui just captures the data, kind of done from the back-end POV
-email:
-cron job sends out email weds night letting ALL (for now until we incorporate groups) users know about next week's event poll.
+
+cron job weds night
+ creates new sports (for now) event
+ this should implicitly have time slots for all of the days
+ sends out email letting ALL (for now until we incorporate groups) users know about next week's event poll.
+
+
+
cron job tallies votes for each of the current events.
View
@@ -6,6 +6,16 @@
end
+ describe "#start_new_sports_event" do
+
+ describe "should create new event"
+ expect { Event.start_new_sports_event }.to
+ change { Event.count }.by(1)
+ end
+
+
+ end
+
end
View
@@ -1,38 +1,37 @@
-# This file is copied to spec/ when you run 'rails generate rspec:install'
-ENV["RAILS_ENV"] ||= 'test'
-require File.expand_path("../../config/environment", __FILE__)
-require 'rspec/rails'
-require 'rspec/autorun'
-
-# Requires supporting ruby files with custom matchers and macros, etc,
-# in spec/support/ and its subdirectories.
-Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
-
-RSpec.configure do |config|
- # ## Mock Framework
- #
- # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
- #
- # config.mock_with :mocha
- # config.mock_with :flexmock
- # config.mock_with :rr
-
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
- config.fixture_path = "#{::Rails.root}/spec/fixtures"
-
- # If you're not using ActiveRecord, or you'd prefer not to run each of your
- # examples within a transaction, remove the following line or assign false
- # instead of true.
- config.use_transactional_fixtures = true
-
- # If true, the base class of anonymous controllers will be inferred
- # automatically. This will be the default behavior in future versions of
- # rspec-rails.
- config.infer_base_class_for_anonymous_controllers = false
-
- # Run specs in random order to surface order dependencies. If you find an
- # order dependency and want to debug it, you can fix the order by providing
- # the seed, which is printed after each run.
- # --seed 1234
- config.order = "random"
+require 'rubygems'
+require 'spork'
+#uncomment the following line to use spork with the debugger
+#require 'spork/ext/ruby-debug'
+
+
+Spork.prefork do
+ ENV["RAILS_ENV"] ||= 'test'
+ 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.
+ Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
+
+ RSpec.configure do |config|
+
+ config.mock_with :rspec
+
+ # now you can just call 'create', or 'build', etc w/out having to preface these calls w/ "FactoryGirl"
+ config.include FactoryGirl::Syntax::Methods
+
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
+
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
+ # examples within a transaction, remove the following line or assign false
+ # instead of true.
+ config.use_transactional_fixtures = true
+ end
+end
+
+Spork.each_run do
+ # This code will be run each time you run your specs.
end

0 comments on commit 3120ed4

Please sign in to comment.