Skip to content
This repository has been archived by the owner on Oct 27, 2021. It is now read-only.

Commit

Permalink
remove unneeded use of SandboxedOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Oct 17, 2008
1 parent 598e550 commit f5bb5c6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
1 change: 0 additions & 1 deletion spec/spec/mocks/nil_expectation_warning_spec.rb
Expand Up @@ -31,7 +31,6 @@ module Mocks
end

describe "#allow_message_expectations_on_nil" do
include SandboxedOptions

it "should not effect subsequent examples" do
example_group = Class.new(ExampleGroup)
Expand Down
2 changes: 0 additions & 2 deletions spec/spec/runner/drb_command_line_spec.rb
Expand Up @@ -3,8 +3,6 @@
module Spec
module Runner
describe DrbCommandLine, "without running local server" do
include SandboxedOptions

unless Config::CONFIG['ruby_install_name'] == 'jruby'
it "should print error when there is no running local server" do
err = StringIO.new
Expand Down
5 changes: 1 addition & 4 deletions spec/spec/runner/formatter/html_formatter_spec.rb
Expand Up @@ -6,7 +6,6 @@ module Spec
module Runner
module Formatter
describe HtmlFormatter do
include SandboxedOptions
['--diff', '--dry-run'].each do |opt|
def jruby?
PLATFORM == 'java'
Expand All @@ -23,9 +22,7 @@ def jruby?
args = ['failing_examples/mocking_example.rb', 'failing_examples/diffing_spec.rb', 'examples/pure/stubbing_example.rb', 'examples/pure/pending_example.rb', '--format', 'html', opt]
err = StringIO.new
out = StringIO.new
run_with(
OptionParser.parse(args, err, out)
)
run_with OptionParser.parse(args, err, out)

seconds = /\d+\.\d+ seconds/
html = out.string.gsub seconds, 'x seconds'
Expand Down
5 changes: 2 additions & 3 deletions spec/spec/runner/formatter/spec_mate_formatter_spec.rb
Expand Up @@ -6,7 +6,6 @@ module Spec
module Runner
module Formatter
describe TextMateFormatter do
include SandboxedOptions
attr_reader :root, :suffix, :expected_file
before do
@root = File.expand_path(File.dirname(__FILE__) + '/../../../..')
Expand All @@ -33,9 +32,9 @@ def produces_html_identical_to_manually_designed_document(opt)
]
err = StringIO.new
out = StringIO.new
options = ::Spec::Runner::OptionParser.parse(args, err, out)
run_with(options)

run_with ::Spec::Runner::OptionParser.parse(args, err, out)

yield(out.string)
end
end
Expand Down
8 changes: 4 additions & 4 deletions spec/spec_helper.rb
Expand Up @@ -35,6 +35,10 @@ def exception_from(&block)
end
exception
end

def run_with(options)
::Spec::Runner::CommandLine.run(options)
end
end
end

Expand All @@ -49,8 +53,4 @@ def exception_from(&block)
after(:each) do
::Spec::Runner.use(@original_rspec_options)
end

def run_with(options)
::Spec::Runner::CommandLine.run(options)
end
end unless Object.const_defined?(:SandboxedOptions)

0 comments on commit f5bb5c6

Please sign in to comment.