Permalink
Browse files

Simplified rake test_app task. Removed need for individual Gemfiles a…

…nd ignore the newly created test_app.
  • Loading branch information...
1 parent 0a572cb commit 8a022e903453e69adbd43ed0899b730f14073655 @schof schof committed Sep 7, 2010
View
@@ -44,3 +44,4 @@ vendor/extensions/theme_default/app/stylesheets/*.css
tags
*.swp
rerun.txt
+test_app
View
22 Gemfile
@@ -0,0 +1,22 @@
+source 'http://rubygems.org'
+
+gem "spree", :path => File.dirname(__FILE__)
+
+# gem 'mysql'
+gem 'sqlite3-ruby'
+gem 'ruby-debug' if RUBY_VERSION.to_f < 1.9
+gem "rdoc", "2.2"
+
+gemspec
+
+group :test do
+ gem 'rspec-rails', '2.0.0.beta.19'
+ gem 'fabrication'
+ gem 'thor'
+end
+
+group :cucumber do
+ gem 'cucumber-rails', '~> 0.3.2'
+ gem 'database_cleaner', '~> 0.5.2'
+ gem 'capybara', '~> 0.3.9', :require => false
+end
View
@@ -1,31 +0,0 @@
-source 'http://rubygems.org'
-
-gem 'rails', '3.0.0'
-gem 'sqlite3-ruby', :require => 'sqlite3'
-path '..' do
- gem 'spree_core'
-end
-gem 'devise', '>= 1.1.2'
-gem 'cancan', '>= 1.3.3'
-
-group :development do
- gem 'rake'
-end
-
-group :test do
- gem 'rspec-rails', '2.0.0.beta.19'
- gem 'fabrication'
- gem 'thor'
- gem 'machinist', '~> 2.0.0.beta2'
- gem 'launchy'
-end
-
-group :cucumber do
- gem 'cucumber-rails', '~> 0.3.2'
- gem 'database_cleaner', '~> 0.5.2'
- gem 'capybara', '~> 0.3.9', :require => false
-end
-
-group :test_rails_app do
- gem 'spree_auth', :path => '..'
-end
View
@@ -1,199 +0,0 @@
-PATH
- remote: /Users/steve/code/spree2
- specs:
- spree_auth (0.30.0.beta1)
- cancan (>= 1.3.3)
- devise (>= 1.1.2)
- spree_core (= 0.30.0.beta1)
- spree_core (0.30.0.beta1)
- activemerchant (>= 1.7.1)
- activerecord-tableless (>= 0.1.0)
- acts_as_list (>= 0.1.2)
- bundler (>= 0.9.26)
- faker (>= 0.3.1)
- highline (>= 1.5.1)
- less (>= 1.2.20)
- paperclip (>= 2.3.1.1)
- rails (>= 3.0.0.rc)
- rd_awesome_nested_set (>= 1.4.4)
- rd_resource_controller
- rd_searchlogic
- rd_stump (>= 0.0.2)
- rd_unobtrusive_date_picker (>= 0.1.0)
- state_machine (>= 0.9.4)
- stringex (>= 1.0.3)
- will_paginate (>= 3.0.pre)
-
-GEM
- remote: http://rubygems.org/
- specs:
- abstract (1.0.0)
- actionmailer (3.0.0)
- actionpack (= 3.0.0)
- mail (~> 2.2.5)
- actionpack (3.0.0)
- activemodel (= 3.0.0)
- activesupport (= 3.0.0)
- builder (~> 2.1.2)
- erubis (~> 2.6.6)
- i18n (~> 0.4.1)
- rack (~> 1.2.1)
- rack-mount (~> 0.6.12)
- rack-test (~> 0.5.4)
- tzinfo (~> 0.3.23)
- activemerchant (1.7.2)
- activesupport (>= 2.3.2)
- braintree (>= 2.0.0)
- builder (>= 2.0.0)
- activemodel (3.0.0)
- activesupport (= 3.0.0)
- builder (~> 2.1.2)
- i18n (~> 0.4.1)
- activerecord (3.0.0)
- activemodel (= 3.0.0)
- activesupport (= 3.0.0)
- arel (~> 1.0.0)
- tzinfo (~> 0.3.23)
- activerecord-tableless (0.1.0)
- activerecord
- activeresource (3.0.0)
- activemodel (= 3.0.0)
- activesupport (= 3.0.0)
- activesupport (3.0.0)
- acts_as_list (0.1.2)
- arel (1.0.1)
- activesupport (~> 3.0.0)
- bcrypt-ruby (2.1.2)
- braintree (2.5.0)
- builder
- builder (2.1.2)
- cancan (1.3.4)
- capybara (0.3.9)
- culerity (>= 0.2.4)
- mime-types (>= 1.16)
- nokogiri (>= 1.3.3)
- rack (>= 1.0.0)
- rack-test (>= 0.5.4)
- selenium-webdriver (>= 0.0.3)
- configuration (1.1.0)
- cucumber (0.8.5)
- builder (~> 2.1.2)
- diff-lcs (~> 1.1.2)
- gherkin (~> 2.1.4)
- json_pure (~> 1.4.3)
- term-ansicolor (~> 1.0.4)
- cucumber-rails (0.3.2)
- cucumber (>= 0.8.0)
- culerity (0.2.12)
- database_cleaner (0.5.2)
- devise (1.1.2)
- bcrypt-ruby (~> 2.1.2)
- warden (~> 0.10.7)
- diff-lcs (1.1.2)
- erubis (2.6.6)
- abstract (>= 1.0.0)
- fabrication (0.6.4)
- faker (0.3.1)
- ffi (0.6.3)
- rake (>= 0.8.7)
- gherkin (2.1.5)
- trollop (~> 1.16.2)
- highline (1.6.1)
- i18n (0.4.1)
- json_pure (1.4.6)
- launchy (0.3.7)
- configuration (>= 0.0.5)
- rake (>= 0.8.1)
- less (1.2.21)
- mutter (>= 0.4.2)
- treetop (>= 1.4.2)
- machinist (2.0.0.beta2)
- mail (2.2.5)
- activesupport (>= 2.3.6)
- mime-types
- treetop (>= 1.4.5)
- mime-types (1.16)
- mutter (0.5.3)
- nokogiri (1.4.3.1)
- paperclip (2.3.3)
- activerecord
- activesupport
- polyglot (0.3.1)
- rack (1.2.1)
- rack-mount (0.6.13)
- rack (>= 1.0.0)
- rack-test (0.5.4)
- rack (>= 1.0)
- rails (3.0.0)
- actionmailer (= 3.0.0)
- actionpack (= 3.0.0)
- activerecord (= 3.0.0)
- activeresource (= 3.0.0)
- activesupport (= 3.0.0)
- bundler (~> 1.0.0)
- railties (= 3.0.0)
- railties (3.0.0)
- actionpack (= 3.0.0)
- activesupport (= 3.0.0)
- rake (>= 0.8.4)
- thor (~> 0.14.0)
- rake (0.8.7)
- rd_awesome_nested_set (1.4.4)
- activerecord (>= 1.1)
- rd_resource_controller (1.0.0.rc)
- rd_searchlogic (3.0.0.rc)
- activerecord (>= 3.0.0.beta4)
- rd_stump (0.0.2)
- rd_unobtrusive_date_picker (0.1.0)
- rspec (2.0.0.beta.19)
- rspec-core (= 2.0.0.beta.19)
- rspec-expectations (= 2.0.0.beta.19)
- rspec-mocks (= 2.0.0.beta.19)
- rspec-core (2.0.0.beta.19)
- rspec-expectations (2.0.0.beta.19)
- diff-lcs (>= 1.1.2)
- rspec-mocks (2.0.0.beta.19)
- rspec-rails (2.0.0.beta.19)
- rspec (= 2.0.0.beta.19)
- webrat (>= 0.7.2.beta.1)
- rubyzip (0.9.4)
- selenium-webdriver (0.0.28)
- ffi (>= 0.6.1)
- json_pure
- rubyzip
- sqlite3-ruby (1.3.1)
- state_machine (0.9.4)
- stringex (1.1.0)
- term-ansicolor (1.0.5)
- thor (0.14.0)
- treetop (1.4.8)
- polyglot (>= 0.3.1)
- trollop (1.16.2)
- tzinfo (0.3.23)
- warden (0.10.7)
- rack (>= 1.0.0)
- webrat (0.7.2.beta.1)
- nokogiri (>= 1.2.0)
- rack (>= 1.0)
- rack-test (>= 0.5.3)
- will_paginate (3.0.pre2)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- cancan (>= 1.3.3)
- capybara (~> 0.3.9)
- cucumber-rails (~> 0.3.2)
- database_cleaner (~> 0.5.2)
- devise (>= 1.1.2)
- fabrication
- launchy
- machinist (~> 2.0.0.beta2)
- rails (= 3.0.0)
- rake
- rspec-rails (= 2.0.0.beta.19)
- spree_auth!
- spree_core!
- sqlite3-ruby
- thor
View
@@ -18,8 +18,7 @@ Running Tests
You need to do a quick one-time creation of a test application and then you can use it to run the tests.
- rake regenerate_test_app
- rake test_app:rebuild_dbs
+ rake test_app
Then run the tests
View
@@ -1,5 +1,4 @@
require 'rubygems'
-require 'bundler'
require 'rake'
require 'rake/testtask'
require 'rake/packagetask'
@@ -18,8 +17,6 @@ task :release => :package do
Rake::Task['gem:push'].invoke
end
-Bundler.setup(:test, :cucumber, :development, :test_rails_app)
-
desc "Default Task"
task :default => [ :spec ]
@@ -33,15 +30,23 @@ Cucumber::Rake::Task.new do |t|
end
desc "Regenerates a rails 3 app for testing"
-task :regenerate_test_app do
- require 'test_helpers/test_app/test_app_generator'
- class AuthTestAppGenerator < TestAppGenerator
- def install_auth
- inside "" do
- run "rails generate spree_auth:install --force"
+task :test_app do
+ require '../lib/generators/spree/test_app_generator'
+ class AuthTestAppGenerator < Spree::Generators::TestAppGenerator
+ def tweak_gemfile
+ append_file 'Gemfile' do
+<<-gems
+ gem 'spree_core', :path => '../../../core'
+ gem 'spree_auth', :path => '../..'
+gems
end
end
+ def install_gems
+ generate 'spree_core:install -f'
+ generate 'spree_auth:install -f'
+ end
+
def migrate_db
run_migrations
end
View
@@ -1,8 +1,9 @@
# This file is copied to ~/spec when you run 'ruby script/generate rspec'
# from the project root directory.
ENV["RAILS_ENV"] ||= 'test'
-require 'test_app/config/environment'
+require File.expand_path("../test_app/config/environment", __FILE__)
require 'rspec/rails'
+require 'fabrication'
# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
@@ -1,5 +0,0 @@
-require 'machinist/active_record'
-
-User.blueprint do
- email { "email#{sn}@person.com" }
-end
Oops, something went wrong.

0 comments on commit 8a022e9

Please sign in to comment.