spec/synx/tabber_spec.rb in synx-0.0.51 vs spec/synx/tabber_spec.rb in synx-0.0.52
- old
+ new
@@ -51,14 +51,21 @@
it "should call system's puts on the string, appending the appropraite indentation" do
Synx::Tabber.increase(3)
expect(Kernel).to receive(:puts).with(" Hello, world.")
Synx::Tabber.puts("Hello, world.")
end
+
+ it "should not print anything if quiet is true" do
+ Synx::Tabber.quiet = true
+ Synx::Tabber.increase(3)
+ expect(Kernel).to_not receive(:puts)
+ Synx::Tabber.puts("Hello, world.")
+ end
end
describe "::a_single_tab" do
it "should be two spaces" do
expect(Synx::Tabber.send(:a_single_tab)).to eq " "
end
end
-end
\ No newline at end of file
+end