Permalink
Browse files

prep for 2.6.0.rc1

  • Loading branch information...
1 parent 08f5d4e commit cd4533235fac5dc8d0878c35d7f266484a1abcce @dchelimsky dchelimsky committed Apr 18, 2011
Showing with 26 additions and 14 deletions.
  1. +20 −12 Rakefile
  2. +1 −1 lib/rspec/rails/version.rb
  3. +5 −1 rspec-rails.gemspec
View
@@ -39,8 +39,27 @@ require 'yaml'
require 'rake/rdoctask'
require 'rspec'
require 'rspec/core/rake_task'
-require 'cucumber/rake/task'
+begin
+ require 'cucumber/rake/task'
+
+ Cucumber::Rake::Task.new(:cucumber)
+
+ namespace :cucumber do
+ desc "Run cucumber features using rcov"
+ Cucumber::Rake::Task.new :rcov => :cleanup_rcov_files do |t|
+ t.cucumber_opts = %w{--format progress}
+ t.rcov = true
+ t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features"]
+ t.rcov_opts << %[--text-report --sort coverage --aggregate coverage.data]
+ end
+ end
+rescue LoadError
+ puts "unable to load cucumber, some tasks unavailable"
+ task :cucumber do
+ # no-op
+ end
+end
task :cleanup_rcov_files do
rm_rf 'coverage.data'
end
@@ -50,7 +69,6 @@ RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = %w[--color]
end
-Cucumber::Rake::Task.new(:cucumber)
namespace :spec do
desc "Run all examples using rcov"
@@ -61,16 +79,6 @@ namespace :spec do
end
end
-namespace :cucumber do
- desc "Run cucumber features using rcov"
- Cucumber::Rake::Task.new :rcov => :cleanup_rcov_files do |t|
- t.cucumber_opts = %w{--format progress}
- t.rcov = true
- t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features"]
- t.rcov_opts << %[--text-report --sort coverage --aggregate coverage.data]
- end
-end
-
namespace :generate do
desc "generate a fresh app with rspec installed"
task :app do |t|
@@ -1,7 +1,7 @@
module RSpec # :nodoc:
module Rails # :nodoc:
module Version # :nodoc:
- STRING = '2.5.0'
+ STRING = '2.6.0.rc1'
end
end
end
View
@@ -60,6 +60,10 @@ Gem::Specification.new do |s|
s.add_runtime_dependency(%q<activesupport>, ["~> 3.0"])
s.add_runtime_dependency(%q<actionpack>, ["~> 3.0"])
s.add_runtime_dependency(%q<railties>, ["~> 3.0"])
- s.add_runtime_dependency "rspec", "~> #{RSpec::Rails::Version::STRING.split('.')[0..1].concat(['0']).join('.')}"
+ if RSpec::Rails::Version::STRING =~ /[a-zA-Z]+/
+ s.add_runtime_dependency "rspec-rails", "= #{RSpec::Rails::Version::STRING}"
+ else
+ s.add_runtime_dependency "rspec-rails", "~> #{RSpec::Rails::Version::STRING.split('.')[0..1].concat(['0']).join('.')}"
+ end
end

0 comments on commit cd45332

Please sign in to comment.