test/unit/utils/ui_test.rb in inch-0.5.0.rc5 vs test/unit/utils/ui_test.rb in inch-0.5.0.rc6
- old
+ new
@@ -1,42 +1,42 @@
-require File.expand_path(File.dirname(__FILE__) + "/../../test_helper")
+require File.expand_path(File.dirname(__FILE__) + '/../../test_helper')
describe ::Inch::Utils::UI do
- it "should trace" do
+ it 'should trace' do
out, err = capture_io do
@instance = ::Inch::Utils::UI.new
- @instance.trace("Test")
+ @instance.trace('Test')
end
- refute out.empty?, "there should be output"
- assert err.empty?, "there should be no errors"
+ refute out.empty?, 'there should be output'
+ assert err.empty?, 'there should be no errors'
end
- it "should trace header" do
+ it 'should trace header' do
out, err = capture_io do
@instance = ::Inch::Utils::UI.new
- @instance.header("Test", :red)
+ @instance.header('Test', :red)
end
- refute out.empty?, "there should be output"
- assert err.empty?, "there should be no errors"
+ refute out.empty?, 'there should be output'
+ assert err.empty?, 'there should be no errors'
end
- it "should trace debug if ENV variable is set" do
- ENV["DEBUG"] = "1"
+ it 'should trace debug if ENV variable is set' do
+ ENV['DEBUG'] = '1'
out, err = capture_io do
@instance = ::Inch::Utils::UI.new
- @instance.debug("Test")
+ @instance.debug('Test')
end
- ENV["DEBUG"] = nil
- refute out.empty?, "there should be output"
- assert err.empty?, "there should be no errors"
+ ENV['DEBUG'] = nil
+ refute out.empty?, 'there should be output'
+ assert err.empty?, 'there should be no errors'
end
- it "should not trace debug if ENV variable is set" do
- refute ENV["DEBUG"]
+ it 'should not trace debug if ENV variable is set' do
+ refute ENV['DEBUG']
out, err = capture_io do
@instance = ::Inch::Utils::UI.new
- @instance.debug("Test")
+ @instance.debug('Test')
end
- assert out.empty?, "there should be no output"
- assert err.empty?, "there should be no errors"
+ assert out.empty?, 'there should be no output'
+ assert err.empty?, 'there should be no errors'
end
end