I wanted a simple raketask to check the features without typing:
$ rake spec SPEC=spec/features/**/*_spec.rb
I wanted to type:
$ rake spec:features
Creating the new raketask is quite simple:
desc "Run the code examples in spec/features" task "spec:features" do Rails.env = ENV['RAILS_ENV'] = 'test' ENV['SPEC'] = "spec/features/**/*_spec.rb" Rake::Task['spec'].invoke endNote that the spec is set as an ENV variable and not passed as an argument to the invoke command.