1
0
Fork 0
mirror of https://github.com/awesome-print/awesome_print synced 2023-03-27 23:22:34 -04:00

Get rid of old Rspec 1.3 dependency

This commit is contained in:
Mike Dvorkin 2011-05-06 15:20:52 -07:00
parent 437810bff5
commit 9c30b5286c
4 changed files with 17 additions and 46 deletions

View file

@ -252,9 +252,9 @@ For example:
### Running Specs ###
$ rake spec # Entire spec suite.
$ ruby -rubygems spec/logger_spec.rb # Individual spec file (Ruby 1.8.7 and RSpec 1.3+)
$ rspec spec/logger_spec.rb # Individual spec file (Ruby 1.9.2 and RSpec 2.0+)
$ gem install rspec # RSpec 2.x is the requirement.
$ rake spec # Run the entire spec suite.
$ rspec spec/logger_spec.rb # Run individual spec file.
### Note on Patches/Pull Requests ###
* Fork the project on Github.

View file

@ -11,11 +11,7 @@ begin
gem.email = "mike@dvorkin.net"
gem.homepage = "http://github.com/michaeldv/awesome_print"
gem.authors = ["Michael Dvorkin"]
if RUBY_VERSION.to_f >= 1.9
gem.add_development_dependency "rspec", ">= 2.0.0"
else
gem.add_development_dependency "rspec", ">= 1.3.0"
end
gem.add_development_dependency "rspec", ">= 2.5.0"
gem.files = FileList["[A-Z]*", "lib/**/*.rb", "rails/*.rb", "spec/*", "init.rb"]
gem.has_rdoc = false
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
@ -25,30 +21,15 @@ rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end
if RUBY_VERSION.to_f >= 1.9
require "rspec/core/rake_task" # RSpec 2.0
RSpec::Core::RakeTask.new(:spec) do |spec|
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = 'spec/**/*_spec.rb'
spec.rspec_opts = ['--color']
end
end
RSpec::Core::RakeTask.new(:rcov) do |spec|
RSpec::Core::RakeTask.new(:rcov) do |spec|
spec.rcov = true
spec.rcov_opts = %q[--exclude "spec"]
end
else
require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:spec) do |spec|
spec.libs << 'lib' << 'spec'
spec.spec_opts = ['--color']
spec.spec_files = FileList['spec/**/*_spec.rb']
end
Spec::Rake::SpecTask.new(:rcov) do |spec|
spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
end
end
task :spec => :check_dependencies

View file

@ -66,12 +66,12 @@ Gem::Specification.new do |s|
s.specification_version = 3
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
s.add_development_dependency(%q<rspec>, [">= 1.3.0"])
s.add_development_dependency(%q<rspec>, [">= 2.5.0"])
else
s.add_dependency(%q<rspec>, [">= 1.3.0"])
s.add_dependency(%q<rspec>, [">= 2.5.0"])
end
else
s.add_dependency(%q<rspec>, [">= 1.3.0"])
s.add_dependency(%q<rspec>, [">= 2.5.0"])
end
end

View file

@ -4,24 +4,14 @@
# See LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
#
# Running specs with Ruby 1.8.7 and RSpec 1.3+:
# Running specs from the command line:
# $ rake spec # Entire spec suite.
# $ ruby -rubygems spec/logger_spec.rb # Individual spec file.
#
# Running specs with Ruby 1.9.2 and RSpec 2.0+:
# $ rake spec # Entire spec suite.
# $ rspec spec/logger_spec.rb # Individual spec file.
# $ ruby -S rspec spec/logger_spec.rb # Individual spec file.
#
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'ap'
if RUBY_VERSION.to_f < 1.9
require 'rspec'
require 'rspec/autorun'
require 'rubygems'
end
def stub_dotfile!
dotfile = File.join(ENV["HOME"], ".aprc")
File.should_receive(:readable?).at_least(:once).with(dotfile).and_return(false)