Skip to content

Commit

Permalink
Moved spec/acceptance back to ./acceptance, and renamed rake task to …
Browse files Browse the repository at this point in the history
…simply `rake acceptance`
  • Loading branch information
ndbroadbent committed Mar 3, 2012
1 parent c6b6c20 commit a434192
Show file tree
Hide file tree
Showing 12 changed files with 4,690 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ before_script:
- "sh -e /etc/init.d/xvfb start"

# Run RSpec tests and ensure that assets can compile without errors
script: "bundle exec rake spec:no_acceptance && bundle exec rake spec:acceptance && bundle exec rake assets:precompile RAILS_ENV=production"
script: "bundle exec rake spec && bundle exec rake acceptance && bundle exec rake assets:precompile RAILS_ENV=production"

# To stop Travis from running tests for a new commit,
# add the following to your commit message: [ci skip]
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ group :development, :test do
gem 'awesome_print'
end

gem 'test-unit', '~> 2.4.3', :platform => :mri_19, :require => false
gem 'test-unit', '~> 2.4.3', :platform => :mri_19, :require => false
gem 'rspec-rails', '~> 2.8.0'
gem 'factory_girl'
gem 'steak', '~> 2.0.0'
gem 'steak', '~> 2.0.0', :require => false
gem 'headless', '~> 0.2.2'
end

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path("../../spec_helper.rb", __FILE__)
require File.expand_path("../../spec/spec_helper.rb", __FILE__)

require 'steak'
require 'capybara/rails'
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.
11 changes: 5 additions & 6 deletions lib/tasks/rspec.rake
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ if defined?(RSpec)
Rake::Task["db:schema:load"].invoke
Rails.env = tmp_env
end

desc "Run all specs except acceptance"
RSpec::Core::RakeTask.new(:no_acceptance => "spec:prepare") do |c|
include_dirs = Dir["./spec/*/"].map { |dir| File.basename(dir) } - ["acceptance"]
c.pattern = "./spec/{#{include_dirs.join(",")}}/**/*_spec.rb"
end
end

Rake::Task["spec"].prerequisites.clear
Rake::Task["spec"].prerequisites.push("spec:prepare")

desc 'Run the acceptance specs in ./acceptance'
RSpec::Core::RakeTask.new(:acceptance => 'db:test:prepare') do |t|
t.pattern = 'acceptance/**/*_spec.rb'
end
end
4,681 changes: 4,681 additions & 0 deletions spec/internal/log/test.log

Large diffs are not rendered by default.

0 comments on commit a434192

Please sign in to comment.