Skip to content

Commit

Permalink
Use before() and after() like they're meant to be.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Hamill committed Feb 20, 2012
1 parent 717774b commit 2b2b9b2
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions spec/cane_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,22 @@ def complex_method(a)
output.should include("Classes are not documented")
end

it 'loads options from a .cane file' do
file_name = make_file("class NoDoc")
make_dot_cane("--doc-glob #{file_name}")
context 'with a .cane file' do
before(:each) do
file_name = make_file("class NoDoc")
make_dot_cane("--doc-glob #{file_name}")
end

output, exitstatus = run('')
exitstatus.should == 1
output.should include("Classes are not documented")
after(:each) do
unmake_dot_cane
end

it 'loads options from a .cane file' do
output, exitstatus = run('')

unmake_dot_cane
exitstatus.should == 1
output.should include("Classes are not documented")
end
end

it 'displays a help message' do
Expand Down

0 comments on commit 2b2b9b2

Please sign in to comment.