Skip to content

Commit

Permalink
Alchemy::Shell can be set verbose again.
Browse files Browse the repository at this point in the history
Needed for shell spec ¯\_(ツ)_/¯
  • Loading branch information
Thomas von Deyen committed Feb 25, 2015
1 parent 231c896 commit 99b7faa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/alchemy/shell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ def self.silence!
@silenced = true
end

def self.verbose!
@silenced = false
end

def self.silenced?
@silenced ||= false
end
Expand Down
2 changes: 2 additions & 0 deletions spec/libraries/shell_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ class MyToDoList
end

describe '.log' do
before { Alchemy::Shell.verbose! }

context 'if the message type is "skip"' do
it "the output color should be yellow and cleared again" do
expect(MyToDoList).to receive(:color).with(:yellow)
Expand Down

0 comments on commit 99b7faa

Please sign in to comment.