spec/libraries/shell_spec.rb in alchemy_cms-3.2.1 vs spec/libraries/shell_spec.rb in alchemy_cms-3.3.0.rc1
- old
+ new
@@ -1,17 +1,15 @@
require 'spec_helper'
require 'alchemy/shell'
module Alchemy
-
# Class fixture
class MyToDoList
extend Shell
end
describe Shell do
-
before { allow(MyToDoList).to receive(:puts) }
describe '.todo' do
it "should add given string as a todo by delegating to .add_todo" do
expect(MyToDoList).to receive(:add_todo).with(["", "new todo"])
@@ -96,11 +94,10 @@
end
end
end
describe '.color' do
-
context 'if given name is a constant of Thor::Shell::Color' do
before do
allow(Thor::Shell::Color).to receive(:const_defined?).and_return(true)
end
@@ -118,8 +115,7 @@
it "should return en empty string" do
expect(MyToDoList.send(:color, :not_existing)).to eq('')
end
end
end
-
end
end