Permalink
Browse files

remove -O option from generated test command in autotest/rspec2

  • Loading branch information...
dchelimsky committed Mar 18, 2010
1 parent 80bd5ea commit bb574fe0d7793e5e64dd9b79cc6eb40570f82ac0
Showing with 3 additions and 24 deletions.
  1. +1 −4 lib/autotest/rspec2.rb
  2. +1 −1 rspec-core.gemspec
  3. +1 −19 spec/autotest/rspec_spec.rb
View
@@ -38,7 +38,7 @@ def consolidate_failures(failed)
def make_test_cmd(files_to_test)
files_to_test.empty? ? '' :
- "#{ruby} #{SPEC_PROGRAM} #{normalize(files_to_test).keys.flatten.join(' ')} #{add_options_if_present}"
+ "#{ruby} #{SPEC_PROGRAM} #{normalize(files_to_test).keys.flatten.join(' ')}"
end
def normalize(files_to_test)
@@ -48,7 +48,4 @@ def normalize(files_to_test)
end
end
- def add_options_if_present # :nodoc:
- File.exist?("spec/spec.opts") ? "-O #{File.join('spec','spec.opts')} " : ""
- end
end
View
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
s.authors = ["Chad Humphries", "David Chelimsky"]
- s.date = %q{2010-03-15}
+ s.date = %q{2010-03-17}
s.description = %q{Rspec runner and example group classes}
s.email = %q{dchelimsky@gmail.com;chad.humphries@gmail.com}
s.executables = ["rspec", "spec"]
@@ -1,31 +1,13 @@
require "spec_helper"
describe Autotest::Rspec2 do
- describe "adding spec.opts --options" do
- before(:each) do
- @rspec_autotest = Autotest::Rspec2.new
- end
-
- it "should return the command line option to add spec.opts if the options file exists" do
- File.stub!(:exist?).and_return true
- @rspec_autotest.add_options_if_present.should == "-O spec/spec.opts "
- end
-
- it "should return an empty string if no spec.opts exists" do
- File.stub!(:exist?).and_return false
- Autotest::Rspec2.new.add_options_if_present.should == ""
- end
- end
-
describe "commands" do
before(:each) do
@rspec_autotest = Autotest::Rspec2.new
@rspec_autotest.stub!(:ruby).and_return "ruby"
- @rspec_autotest.stub!(:add_options_if_present).and_return "-O spec/spec.opts"
@ruby = @rspec_autotest.ruby
@spec_cmd = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'bin', 'rspec'))
- @options = @rspec_autotest.add_options_if_present
files = %w[file_one file_two]
@files_to_test = {
files[0] => [],
@@ -38,7 +20,7 @@
it "should make the appropriate test command" do
actual = @rspec_autotest.make_test_cmd(@files_to_test)
- expected = /#{@ruby} #{@spec_cmd} (.*) #{@options}/
+ expected = /#{@ruby} #{@spec_cmd} (.*)/
actual.should match(expected)

0 comments on commit bb574fe

Please sign in to comment.