Socket
Book a DemoInstallSign in
Socket

spe_cuke

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spe_cuke

0.4.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

= SpeCuke

A simple helper command to run rspec or cucumber tests.

== Description

spe_cuke provides command `sc'.

This helps you to run spec/cuke test in various environments, such as bundler-ized?, --format-executable in .gemrc or so.

=== Example The command below invokes

sc --line 32 spec/foobar/foobar_spec.rb

when bundlized(Gemfile exists)

bundle exec spec --color --fn spec/foobar/foobar_spec.rb:32

when not bundlized but --format-executable in .gemrc

spec18 --color --fn spec/foobar/foobar_spec.rb:32

and has option to specify invoking via rake.

sc -r --line 32 spec/foobar/foobar_spec.rb #=> bundle18 exec rake spec SPEC=spec/foobar/foobar_spec.rb:32

== Vim script

append below to your .vimrc or so.

function! s:SetupSpeCuke() command! RunTestFile exe '!sc ' . expand('%:p') command! RunTestCase exe '!sc --line ' . line('.') . ' ' . expand('%:p')

nnoremap -tf :RunTestFile nnoremap -tc :RunTestCase endfunction

au BufRead,BufNewFile _spec.rb,.feature call s:SetupSpeCuke()

Then

You type '-tf' in normal mode, invokes 'sc --line <current_line> <current_file>' and test around current line's example/scenario.

You type '-tc' in normal mode, invokes 'sc <current_file>' and test current file.

== Planning features.

  • spork support
  • run spec from name-paired script (run spec/spe_cuke/environment_spec.rb from lib/spe_cuke/environment.rb)

== Installation

gem install spe_cuke

== Acknowledgements

spe_cuke's development has been supported by Eiwa System Management,Inc.

== Copyright

Author:: MOROHASHI Kyosuke moronatural@gmail.com Copyright:: Copyright (c) 2010 MOROHASHI Kyosuke License:: MIT

FAQs

Package last updated on 04 Jan 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.