Permalink
Browse files

mostly converted to rspec

  • Loading branch information...
1 parent ec9d51e commit 7405388cfb4b77e8fc9da2974acf822c5af8a4b8 @markburns committed Mar 18, 2012
Showing with 18 additions and 31 deletions.
  1. +2 −3 spec/color_spec.rb
  2. +2 −5 spec/command_spec.rb
  3. +2 −5 spec/config_spec.rb
  4. +5 −7 spec/item_spec.rb
  5. +3 −5 spec/list_spec.rb
  6. +2 −2 spec/platform_spec.rb
  7. +2 −4 spec/remote_spec.rb
View
@@ -1,7 +1,6 @@
-require 'helper'
-
-class TestColor < Test::Unit::TestCase
+require File.expand_path('spec/spec_helper')
+describe Boom::Color do
it "colorize" do
assert_equal "\e[35mBoom!\e[0m",
Boom::Color.colorize("Boom!", :magenta)
View
@@ -1,10 +1,7 @@
-# coding: utf-8
-
-require 'helper'
+require File.expand_path('spec/spec_helper')
require 'output_interceptor'
-class TestCommand < Test::Unit::TestCase
-
+describe Boom::Command do
before do
[Boom::Platform::Darwin, Boom::Platform::Linux,
Boom::Platform::Windows].each do |klass|
View
@@ -1,10 +1,7 @@
-# coding: utf-8
-
-require 'helper'
+require File.expand_path('spec/spec_helper')
require 'output_interceptor'
-class TestConfig < Test::Unit::TestCase
-
+describe Boom::Config do
before do
Boom::Config.any_instance.stubs(:file).
returns("test/examples/test_json.json")
View
@@ -1,9 +1,7 @@
-# coding: utf-8
-
-require 'helper'
-
-class TestItem < Test::Unit::TestCase
+#coding: utf-8
+require File.expand_path('spec/spec_helper')
+describe Boom::Item do
before do
@item = Boom::Item.new('github','https://github.com')
end
@@ -41,12 +39,12 @@ class TestItem < Test::Unit::TestCase
it "url" do
@item.url.should == 'https://github.com'
end
-
+
it "url with additional description" do
@item = Boom::Item.new('github', 'social coding https://github.com')
@item.url.should == 'https://github.com'
end
-
+
it "url without url" do
@item = Boom::Item.new('didum', 'dadam lol omg')
@item.url.should == 'dadam lol omg'
View
@@ -1,9 +1,7 @@
-# coding: utf-8
-
-require 'helper'
-
-class TestList < Test::Unit::TestCase
+#coding: utf-8
+require File.expand_path('spec/spec_helper')
+describe Boom::List do
before do
@list = Boom::List.new('urls')
@item = Boom::Item.new('github','https://github.com')
View
@@ -1,6 +1,6 @@
-require 'helper'
+require File.expand_path('spec/spec_helper')
-class TestPlatform < Test::Unit::TestCase
+describe Boom::Platform do
before do
[Boom::Platform::Darwin, Boom::Platform::Linux,
Boom::Platform::Windows].each do |klass|
View
@@ -1,9 +1,7 @@
-# coding: utf-8
-
-require 'helper'
+require File.expand_path('spec/spec_helper')
require 'output_interceptor'
-class TestRemote < Test::Unit::TestCase
+describe Remote do
def dummy type
m = stub 'storage_type', :class => type
end

0 comments on commit 7405388

Please sign in to comment.