oddlyzen / rspec-console

Run RSpec tests in your rails console

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RSpec Console

RSpec Console allows you to run your RSpec tests in a Rails console. Best served chilled with irb-config.

Watch the screencast

Watch the screencast!

Usage

Install it with:

gem 'rspec-console'

If you have Pry installed, you will have access to the rspec command in your console, which works exactly like the shell command line rspec one.

pafy@bisou ~/prj/sniper [master●] % rails c
~/prj/crowdtap/sniper (development) > rspec spec/integration/closing_brand_action_spec.rb:33 --format=doc
Run options: include {:locations=>{"./spec/integration/closing_brand_action_spec.rb"=>[33]}}

Sniper
  when reaching the maximum number of participants
    no longer targets this brand action on members

Finished in 0.12654 seconds
1 example, 0 failures
~/prj/crowdtap/sniper (development) >

If you don't have pry, you can use:

RSpecConsole.run 'spec/integration/closing_brand_action_spec.rb:33' '--format=doc'

TODO

  • Testing

License

MIT License

About

Run RSpec tests in your rails console


Languages

Language:Ruby 100.0%