Skip to content
This repository has been archived by the owner on Nov 2, 2019. It is now read-only.

Commit

Permalink
use rspec for specs, moved dummy app
Browse files Browse the repository at this point in the history
  • Loading branch information
TildeWill committed Dec 28, 2011
1 parent 49e4fea commit f9ecff3
Show file tree
Hide file tree
Showing 47 changed files with 47 additions and 30 deletions.
7 changes: 4 additions & 3 deletions .gitignore
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Expand Up @@ -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'

22 changes: 19 additions & 3 deletions Gemfile.lock
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)

Expand All @@ -136,4 +150,6 @@ DEPENDENCIES
heroku
jquery-rails
mysql (~> 2.8.1)
rspec (~> 2.7.0)
rspec-rails (~> 2.7.0)
whurl_engine!
10 changes: 5 additions & 5 deletions Rakefile
Expand Up @@ -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
2 changes: 1 addition & 1 deletion script/rails
Expand Up @@ -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.
Expand Up @@ -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,
Expand Down
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.
File renamed without changes.
14 changes: 14 additions & 0 deletions spec/spec_helper.rb
@@ -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
10 changes: 0 additions & 10 deletions test/test_helper.rb

This file was deleted.

7 changes: 0 additions & 7 deletions test/whurl_engine_test.rb

This file was deleted.

0 comments on commit f9ecff3

Please sign in to comment.