Skip to content

Commit

Permalink
replace CommandLine with Runner for RSpec 3.0.0.rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
Brad Carson committed May 24, 2014
1 parent a94412c commit 38c79dc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/spork/test_framework/rspec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require 'rspec/core/version'

class Spork::TestFramework::RSpec < Spork::TestFramework
DEFAULT_PORT = 8989
HELPER_FILE = File.join(Dir.pwd, "spec/spec_helper.rb")
Expand All @@ -7,11 +9,19 @@ def run_tests(argv, stderr, stdout)
::Spec::Runner::CommandLine.run(
::Spec::Runner::OptionParser.parse(argv, stderr, stdout)
)
elsif rspec3?
options = ::RSpec::Core::ConfigurationOptions.new(argv)
::RSpec::Core::Runner.new(options).run(stderr, stdout)
else
::RSpec::Core::CommandLine.new(argv).run(stderr, stdout)
end
end

def rspec3?
return false if !defined?(::RSpec::Core::Version::STRING)
::RSpec::Core::Version::STRING =~ /^3\./
end

def rspec1?
defined?(Spec) && !defined?(RSpec)
end
Expand Down

44 comments on commit 38c79dc

@bonzofenix
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is someone maintaining spork???

@edgessey
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this in! I hope that this makes it into the main gem.

@stefanlance
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. This needs to be merged.

@KamilMroczek
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@krishnasrihari
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@dedene
Copy link

@dedene dedene commented on 38c79dc Aug 5, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@lasssim
Copy link

@lasssim lasssim commented on 38c79dc Aug 7, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@mtsagias
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@IlyaGulya
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@mreeves1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@premedios
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@michaltn
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@konpyu
Copy link

@konpyu konpyu commented on 38c79dc Sep 7, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@heberuriegas
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@zlotnika
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kenxle
Copy link

@kenxle kenxle commented on 38c79dc Sep 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@sineed
Copy link

@sineed sineed commented on 38c79dc Sep 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@wgkoro
Copy link

@wgkoro wgkoro commented on 38c79dc Sep 19, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@jechol
Copy link

@jechol jechol commented on 38c79dc Sep 25, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@aminariana
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@Alex-Karpov-878
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@sao
Copy link

@sao sao commented on 38c79dc Oct 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@GaaraLi
Copy link

@GaaraLi GaaraLi commented on 38c79dc Oct 5, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@hakunin
Copy link

@hakunin hakunin commented on 38c79dc Oct 5, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@rskvirskiy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@hakunin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For anyone looking for a quick test execution, I ended up using spring https://github.com/rails/spring with guard which auto starts test of the correct spec when you edit a source.

@PiyushRamuka
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1
Was trying to resolve this from past 2 days & finally!

@shicholas
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, please merge! Spring is nice, but spork doesn't require a bootloaded rails process which is what I'm looking for.

@MarkMurphy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'mon merge already!

@atmosx
Copy link

@atmosx atmosx commented on 38c79dc Oct 30, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please merge.

@BroiSatse
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@heberuriegas
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@nychka
Copy link

@nychka nychka commented on 38c79dc Jan 15, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's really helpful.Thanx

@venabulum
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Thank you so much!

@arbaaz
Copy link

@arbaaz arbaaz commented on 38c79dc Jan 30, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@thallam
Copy link

@thallam thallam commented on 38c79dc Feb 3, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@hiroara
Copy link

@hiroara hiroara commented on 38c79dc Feb 5, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1
It was a great help for me!

@sedovdmitry
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1
Thanks!

@mooreniemi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@jasonirwin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. Please merge

@bilus
Copy link

@bilus bilus commented on 38c79dc Jun 4, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@BattleBrisket
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, but it doesn't exist as a pull request over on the official spork repo.

All the 👍's in the world aren't gonna help if the author doesn't make a PR.

@ElminDmitry
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@VitaliiKravchenko
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Please sign in to comment.