Permalink
Browse files

use rspec for specs, moved dummy app

  • Loading branch information...
1 parent 49e4fea commit f9ecff3dc3e3ab0f6e3d58b42fb5b2ffa497ea34 @TildeWill committed Dec 28, 2011
Showing with 47 additions and 30 deletions.
  1. +4 −3 .gitignore
  2. +3 −0 Gemfile
  3. +19 −3 Gemfile.lock
  4. +5 −5 Rakefile
  5. +1 −1 script/rails
  6. 0 {test → spec}/dummy/Rakefile
  7. 0 {test → spec}/dummy/app/assets/javascripts/application.js
  8. 0 {test → spec}/dummy/app/assets/stylesheets/application.css
  9. 0 {test → spec}/dummy/app/controllers/application_controller.rb
  10. 0 {test → spec}/dummy/app/helpers/application_helper.rb
  11. 0 {test → spec}/dummy/app/mailers/.gitkeep
  12. 0 {test → spec}/dummy/app/models/.gitkeep
  13. 0 {test → spec}/dummy/app/views/layouts/application.html.erb
  14. 0 {test → spec}/dummy/app/views/layouts/whurl_engine/application.html.haml
  15. 0 {test → spec}/dummy/config.ru
  16. 0 {test → spec}/dummy/config/application.rb
  17. 0 {test → spec}/dummy/config/boot.rb
  18. 0 {test → spec}/dummy/config/database.sample.yml
  19. 0 {test → spec}/dummy/config/database.yml
  20. 0 {test → spec}/dummy/config/environment.rb
  21. 0 {test → spec}/dummy/config/environments/development.rb
  22. 0 {test → spec}/dummy/config/environments/production.rb
  23. +1 −1 {test → spec}/dummy/config/environments/test.rb
  24. 0 {test → spec}/dummy/config/initializers/backtrace_silencers.rb
  25. 0 {test → spec}/dummy/config/initializers/inflections.rb
  26. 0 {test → spec}/dummy/config/initializers/mime_types.rb
  27. 0 {test → spec}/dummy/config/initializers/secret_token.rb
  28. 0 {test → spec}/dummy/config/initializers/session_store.rb
  29. 0 {test → spec}/dummy/config/initializers/wrap_parameters.rb
  30. 0 {test → spec}/dummy/config/locales/en.yml
  31. 0 {test → spec}/dummy/config/routes.rb
  32. 0 {test → spec}/dummy/db/schema.rb
  33. 0 {test → spec}/dummy/lib/assets/.gitkeep
  34. 0 {test → spec}/dummy/log/.gitkeep
  35. 0 {test → spec}/dummy/public/404.html
  36. 0 {test → spec}/dummy/public/422.html
  37. 0 {test → spec}/dummy/public/500.html
  38. 0 {test → spec}/dummy/public/favicon.ico
  39. 0 {test → spec}/dummy/script/rails
  40. 0 {test → spec}/fixtures/whurl_engine/whurl_requests.yml
  41. 0 {test → spec}/functional/whurl_engine/api_call_controller_test.rb
  42. 0 {test → spec}/integration/navigation_test.rb
  43. +14 −0 spec/spec_helper.rb
  44. 0 {test → spec}/unit/helpers/whurl_engine/api_call_helper_test.rb
  45. 0 {test → spec}/unit/whurl_engine/whurl_request_test.rb
  46. +0 −10 test/test_helper.rb
  47. +0 −7 test/whurl_engine_test.rb
View
@@ -1,9 +1,10 @@
.bundle/
log/*.log
pkg/
-test/dummy/db/*.sqlite3
-test/dummy/log/*.log
-test/dummy/tmp/
+test
+spec/dummy/db/*.sqlite3
+spec/dummy/log/*.log
+spec/dummy/tmp/
.idea/*
config/database.yml
tmp
View
@@ -8,3 +8,6 @@ gemspec
# jquery-rails is used by the dummy application
gem "jquery-rails"
+gem 'rspec', '~> 2.7.0'
+gem 'rspec-rails', '~> 2.7.0'
+
View
@@ -45,11 +45,12 @@ GEM
addressable (2.2.6)
arel (2.2.1)
builder (3.0.0)
- coderay (0.9.6)
+ coderay (0.9.8)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.2.0)
+ diff-lcs (1.1.3)
erubis (2.7.0)
execjs (1.2.13)
multi_json (~> 1.0)
@@ -60,7 +61,7 @@ GEM
rubyzip
term-ansicolor (~> 1.0.5)
hike (1.2.1)
- httmultiparty (0.2)
+ httmultiparty (0.3.6)
httparty (>= 0.7.3)
multipart-post
httparty (0.8.1)
@@ -112,6 +113,19 @@ GEM
json (~> 1.4)
rest-client (1.6.7)
mime-types (>= 1.16)
+ rspec (2.7.0)
+ rspec-core (~> 2.7.0)
+ rspec-expectations (~> 2.7.0)
+ rspec-mocks (~> 2.7.0)
+ rspec-core (2.7.1)
+ rspec-expectations (2.7.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.7.0)
+ rspec-rails (2.7.0)
+ actionpack (~> 3.0)
+ activesupport (~> 3.0)
+ railties (~> 3.0)
+ rspec (~> 2.7.0)
rubyzip (0.9.5)
sass (3.1.12)
sprockets (2.0.3)
@@ -125,7 +139,7 @@ GEM
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.31)
- uglifier (1.2.0)
+ uglifier (1.2.1)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
@@ -136,4 +150,6 @@ DEPENDENCIES
heroku
jquery-rails
mysql (~> 2.8.1)
+ rspec (~> 2.7.0)
+ rspec-rails (~> 2.7.0)
whurl_engine!
View
@@ -20,20 +20,20 @@ RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_files.include('lib/**/*.rb')
end
-APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
+APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
load 'rails/tasks/engine.rake'
Bundler::GemHelper.install_tasks
require 'rake/testtask'
-Rake::TestTask.new(:test) do |t|
+Rake::TestTask.new(:spec) do |t|
t.libs << 'lib'
- t.libs << 'test'
- t.pattern = 'test/**/*_test.rb'
+ t.libs << 'spec'
+ t.pattern = 'spec/**/*_spec.rb'
t.verbose = false
end
-task :default => :test
+task :default => :spec
View
@@ -3,4 +3,4 @@
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
ENGINE_PATH = File.expand_path('../..', __FILE__)
-load File.expand_path('../../test/dummy/script/rails', __FILE__)
+load File.expand_path('../../spec/dummy/script/rails', __FILE__)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -27,7 +27,7 @@
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
- config.action_mailer.delivery_method = :test
+ config.action_mailer.delivery_method = :spec
# Use SQL instead of Active Record's schema dumper when creating the test database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -0,0 +1,14 @@
+ENV["RAILS_ENV"] = "test"
+require File.expand_path("../dummy/config/environment.rb", __FILE__)
+
+require 'rspec/rails'
+
+ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
+
+# Requires supporting ruby files with custom matchers and macros, etc,
+# in spec/support/ and its subdirectories.
+Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
+
+RSpec.configure do |config|
+ config.use_transactional_fixtures = true
+end
View
@@ -1,10 +0,0 @@
-# Configure Rails Environment
-ENV["RAILS_ENV"] = "test"
-
-require File.expand_path("../dummy/config/environment.rb", __FILE__)
-require "rails/test_help"
-
-Rails.backtrace_cleaner.remove_silencers!
-
-# Load support files
-Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
@@ -1,7 +0,0 @@
-require 'test_helper'
-
-class WhurlEngineTest < ActiveSupport::TestCase
- test "truth" do
- assert_kind_of Module, WhurlEngine
- end
-end

0 comments on commit f9ecff3

Please sign in to comment.