Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Sample Rails app with guard-spork and ruby-debug both enabled.
Ruby JavaScript
Branch: master
Pull request Compare This branch is 2 commits behind irohiroki:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
config
db
doc
lib/tasks
public
script
spec
test
vendor/plugins
.gitignore
.rspec
Gemfile
Gemfile.lock
Guardfile
README.markdown
Rakefile
config.ru

README.markdown

guard-spork with ruby-debug enabled

This is a sample Rails application, demonstrating the use of guard-spork and ruby-debug19 together.

Just place a call to the debugger method somewhere in your code that will get called when you run rspec. For example, here in spec/models/user_spec.rb (already added there for your convenience):

require 'spec_helper'

describe User do
  it do
    debugger 
    User.count.should == 0
  end
end

Start up guard (which in turn will start up spork):

bundle exec guard

Then, in a different window/terminal, run your spec:

bundle exec rspec spec/models/user_spec.rb

You should see the ruby-debug console appear in the terminal where you started guard/spork and should be able to type ruby-debug commands into it!

Something went wrong with that request. Please try again.