Skip to content

Commit

Permalink
wrap config-related examples with_sandboxed_config
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Dec 21, 2008
1 parent 10d7701 commit 69fd569
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions spec/spec/example/example_methods_spec.rb
Expand Up @@ -23,20 +23,22 @@ def module_that_is_reopened_method

describe "lifecycle" do
with_sandboxed_options do
before do
@options.formatters << mock("formatter", :null_object => true)
@options.backtrace_tweaker = mock("backtrace_tweaker", :null_object => true)
@reporter = FakeReporter.new(@options)
@options.reporter = @reporter
with_sandboxed_config do
before do
@options.formatters << mock("formatter", :null_object => true)
@options.backtrace_tweaker = mock("backtrace_tweaker", :null_object => true)
@reporter = FakeReporter.new(@options)
@options.reporter = @reporter

ExampleGroup.before_all_parts.should == []
ExampleGroup.before_each_parts.should == []
ExampleGroup.after_each_parts.should == []
ExampleGroup.after_all_parts.should == []
def ExampleGroup.count
@count ||= 0
@count = @count + 1
@count
ExampleGroup.before_all_parts.should == []
ExampleGroup.before_each_parts.should == []
ExampleGroup.after_each_parts.should == []
ExampleGroup.after_all_parts.should == []
def ExampleGroup.count
@count ||= 0
@count = @count + 1
@count
end
end
end

Expand Down

0 comments on commit 69fd569

Please sign in to comment.