Permalink
Browse files

Create the rspec.rake file.

  • Loading branch information...
1 parent c8608bb commit a9aab9af1257af4291434198870ab2b9452b8adc @avh4 avh4 committed Jul 5, 2008
View
@@ -24,6 +24,7 @@ rbiphonetest_generators/rspec_model/USAGE
rbiphonetest_generators/rspec_model/rspec_model_generator.rb
rbiphonetest_generators/rspec_model/templates/spec.rb
rbiphonetest_generators/rspec_model/templates/spec_helper.rb
+rbiphonetest_generators/rspec_model/templates/tasks/rspec.rake
rbiphonetest_generators/story/USAGE
rbiphonetest_generators/story/story_generator.rb
rbiphonetest_generators/story/templates/steps.rb
@@ -16,10 +16,12 @@ def manifest
record do |m|
# Ensure appropriate folder(s) exists
m.directory 'spec'
+ m.directory 'tasks'
# Create stubs
m.file "spec_helper.rb", "spec/spec_helper.rb"
m.template "spec.rb", "spec/#{name}_spec.rb"
+ m.file_copy_each ["tasks/rspec.rake"]
end
end
@@ -0,0 +1,9 @@
+require "spec/rake/spectask"
+
+task :default => :spec
+
+task :spec => :compile
+
+Spec::Rake::SpecTask.new do |t|
+ t.warning = true
+end
@@ -31,6 +31,7 @@ def test_generator_without_options
run_generator("rspec_model", [name], sources)
assert_generated_file "spec/spec_helper.rb"
assert_generated_file "spec/#{name}_spec.rb"
+ assert_generated_file "tasks/rspec.rake"
end
private

0 comments on commit a9aab9a

Please sign in to comment.