Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rspec support #40

Merged
merged 3 commits into from
Apr 21, 2012
Merged

Conversation

mikegehard
Copy link

Allow RSpec users to use the testing framework that they are comfortable with instead of having to use Test::Unit.

@davetron5000 davetron5000 merged commit 94f3aa3 into davetron5000:master Apr 21, 2012
@davetron5000
Copy link
Owner

Thanks for the merge. I'll release a new gem once the Travis CI tests pass.

@mikegehard
Copy link
Author

You are most welcome. Thanks for taking the time to write the gem.

@davetron5000
Copy link
Owner

Actually, this leaves the test unit test task in the rakefile. What does the RSpec task look like in a Rakefile? You can just point me to a good example, and I can add it.

@mikegehard
Copy link
Author

Oops...I forgot to look at that.

Here is what the Rakefile should look like for RSpec:

require 'bundler'
require 'rake/clean'
require 'cucumber'
require 'rspec/core/rake_task'
require 'cucumber/rake/task'
gem 'rdoc' # we need the installed RDoc gem, not the system one
require 'rdoc/task'

include Rake::DSL

Bundler::GemHelper.install_tasks

RSpec::Core::RakeTask.new do |t|
t.pattern = "./spec/*_/__spec.rb" # don't need this, it's default.

Put spec opts in a file named .rspec in root

end

CUKE_RESULTS = 'results.html'
CLEAN << CUKE_RESULTS
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = "features --format html -o #{CUKE_RESULTS} --format pretty --no-source -x"
t.fork = false
end

Rake::RDocTask.new do |rd|

rd.main = "README.rdoc"

rd.rdoc_files.include("README.rdoc","lib//*.rb","bin//*")
end

task :default => [:spec,:features]

@mikegehard
Copy link
Author

Looks like it got pasted wrong. I'll work up another commit and get it to you.

@davetron5000
Copy link
Owner

I think I have it working. Check out my commit in a sec

Dave

On Saturday, April 21, 2012 at 5:11 PM, Mike Gehard wrote:

Looks like it got pasted wrong. I'll work up another commit and get it to you.


Reply to this email directly or view it on GitHub:
#40 (comment)

@mikegehard
Copy link
Author

OK added a commit to this branch to make the change.

@davetron5000
Copy link
Owner

I think we crossed wires; here's what I just put up: f512794

It works from what I can tell…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants