Created
October 6, 2010 13:36
-
-
Save chuckremes/613347 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 547dd5e602626e35fd3beeda46395bc7c48d3dff Mon Sep 17 00:00:00 2001 | |
From: Chuck Remes <cremes@mac.com> | |
Date: Wed, 6 Oct 2010 08:34:41 -0500 | |
Subject: [PATCH] add instructions for updating Bones-generated Rakefiles | |
--- | |
Upgrade.markdown | 31 +++++++++++++++++++++++++++++++ | |
1 files changed, 31 insertions(+), 0 deletions(-) | |
diff --git a/Upgrade.markdown b/Upgrade.markdown | |
index 7726675..c6cced0 100644 | |
--- a/Upgrade.markdown | |
+++ b/Upgrade.markdown | |
@@ -56,6 +56,37 @@ Typically in `spec/spec_helper.rb`, configuration is now done like this: | |
# .... | |
end | |
+### Bones | |
+ | |
+Bones produces a handy little Rakefile to provide several services including | |
+running specs. The current version (3.4.7) still assumes RSpec-1. To bring its | |
+Rakefile into conformance with RSpec-2 a few changes are necessary. | |
+ | |
+1. Note that the require line has changed to: | |
+ | |
+ require 'spec/rake/spectask' | |
+ | |
+2. The `spec_opts` accessor has been deprecated in favor of `rspec_opts`. Also, the | |
+ `rspec` command no longer supports the `--options` command line option so the | |
+ options must be embedded directly in the Rakefile. | |
+ | |
+3. The `spec_files` accessor has been replaced by `pattern`. | |
+ | |
+Here is a complete example: | |
+ | |
+ Spec::Rake::SpecTask.new do |t| | |
+ t.spec_opts = ['--options', "\"spec/spec.opts\""] | |
+ t.spec_files = FileList['spec/**/*.rb'] | |
+ end | |
+ | |
+becomes: | |
+ | |
+ RSpec::Core::RakeTask.new do |t| | |
+ t.rspec_opts = ["-c", "-f progress", "-r ./spec/spec_helper.rb"] | |
+ t.pattern = 'spec/**/*_spec.rb' | |
+ end | |
+ | |
+ | |
### .rspec | |
Command line options can be persisted in a `.rspec` file in a project. You | |
-- | |
1.6.3.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment