diff options
| author | hukl <contact@smyck.org> | 2011-02-10 14:19:00 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2011-02-10 14:19:00 +0100 |
| commit | 7379daad1c73bd3610ed296436250b417ac3673d (patch) | |
| tree | 04f722efc678de9d3aa5bf8f1c96e3be33b18bc4 /vendor/plugins/thinking-sphinx/tasks/testing.rb | |
| parent | 91633ac4419d839661e35ae8f2efe5c9089cfb67 (diff) | |
removed thinking_sphinx plugin and replaced it with gem.
also tuned dependencies
Diffstat (limited to 'vendor/plugins/thinking-sphinx/tasks/testing.rb')
| -rw-r--r-- | vendor/plugins/thinking-sphinx/tasks/testing.rb | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/vendor/plugins/thinking-sphinx/tasks/testing.rb b/vendor/plugins/thinking-sphinx/tasks/testing.rb deleted file mode 100644 index 9cb83ba..0000000 --- a/vendor/plugins/thinking-sphinx/tasks/testing.rb +++ /dev/null | |||
| @@ -1,86 +0,0 @@ | |||
| 1 | require 'rubygems' | ||
| 2 | require 'spec/rake/spectask' | ||
| 3 | require 'cucumber/rake/task' | ||
| 4 | |||
| 5 | desc "Run the specs under spec" | ||
| 6 | Spec::Rake::SpecTask.new do |t| | ||
| 7 | t.spec_files = FileList['spec/**/*_spec.rb'] | ||
| 8 | t.spec_opts << "-c" | ||
| 9 | end | ||
| 10 | |||
| 11 | desc "Run all feature-set configurations" | ||
| 12 | task :features do |t| | ||
| 13 | puts "rake features:mysql" | ||
| 14 | system "rake features:mysql" | ||
| 15 | puts "rake features:postgresql" | ||
| 16 | system "rake features:postgresql" | ||
| 17 | end | ||
| 18 | |||
| 19 | namespace :features do | ||
| 20 | def add_task(name, description) | ||
| 21 | Cucumber::Rake::Task.new(name, description) do |t| | ||
| 22 | t.cucumber_opts = "--format pretty" | ||
| 23 | t.step_pattern = [ | ||
| 24 | "features/support/env", | ||
| 25 | "features/support/db/#{name}", | ||
| 26 | "features/support/db/active_record", | ||
| 27 | "features/support/post_database", | ||
| 28 | "features/step_definitions/**.rb" | ||
| 29 | ] | ||
| 30 | end | ||
| 31 | end | ||
| 32 | |||
| 33 | add_task :mysql, "Run feature-set against MySQL" | ||
| 34 | add_task :postgresql, "Run feature-set against PostgreSQL" | ||
| 35 | end | ||
| 36 | |||
| 37 | desc "Generate RCov reports" | ||
| 38 | Spec::Rake::SpecTask.new(:rcov) do |t| | ||
| 39 | t.libs << 'lib' | ||
| 40 | t.spec_files = FileList['spec/**/*_spec.rb'] | ||
| 41 | t.rcov = true | ||
| 42 | t.rcov_opts = ['--exclude', 'spec', '--exclude', 'gems', '--exclude', 'riddle'] | ||
| 43 | end | ||
| 44 | |||
| 45 | namespace :rcov do | ||
| 46 | def add_task(name, description) | ||
| 47 | Cucumber::Rake::Task.new(name, description) do |t| | ||
| 48 | t.cucumber_opts = "--format pretty" | ||
| 49 | t.step_pattern = [ | ||
| 50 | "features/support/env", | ||
| 51 | "features/support/db/#{name}", | ||
| 52 | "features/support/db/active_record", | ||
| 53 | "features/support/post_database", | ||
| 54 | "features/step_definitions/**.rb" | ||
| 55 | ] | ||
| 56 | t.rcov = true | ||
| 57 | t.rcov_opts = [ | ||
| 58 | '--exclude', 'spec', | ||
| 59 | '--exclude', 'gems', | ||
| 60 | '--exclude', 'riddle', | ||
| 61 | '--exclude', 'features' | ||
| 62 | ] | ||
| 63 | end | ||
| 64 | end | ||
| 65 | |||
| 66 | add_task :mysql, "Run feature-set against MySQL with rcov" | ||
| 67 | add_task :postgresql, "Run feature-set against PostgreSQL with rcov" | ||
| 68 | end | ||
| 69 | |||
| 70 | desc "Build cucumber.yml file" | ||
| 71 | task :cucumber_defaults do | ||
| 72 | default_requires = %w( | ||
| 73 | --require features/support/env.rb | ||
| 74 | --require features/support/db/mysql.rb | ||
| 75 | --require features/support/db/active_record.rb | ||
| 76 | --require features/support/post_database.rb | ||
| 77 | ).join(" ") | ||
| 78 | |||
| 79 | step_definitions = FileList["features/step_definitions/**.rb"].collect { |path| | ||
| 80 | "--require #{path}" | ||
| 81 | }.join(" ") | ||
| 82 | |||
| 83 | File.open('cucumber.yml', 'w') { |f| | ||
| 84 | f.write "default: \"#{default_requires} #{step_definitions}\"" | ||
| 85 | } | ||
| 86 | end | ||
