test/test_command.rb in boom-0.0.2 vs test/test_command.rb in boom-0.0.3

- old
+ new

@@ -22,19 +22,17 @@ end class TestCommand < Test::Unit::TestCase def setup - Boom::Storage.any_instance.stubs(:json_file). - returns('test/examples/urls.json') - @storage = Boom::Storage.new + boom_json :urls end def command(cmd) cmd = cmd.split(' ') if cmd Boom::Command.capture_output - Boom::Command.execute(@storage,*cmd) + Boom::Command.execute(*cmd) Boom::Command.captured_output end def test_overview assert_equal ' urls (2)', command(nil) @@ -79,7 +77,12 @@ assert_match /Deleted all your urls/, command('urls delete') end def test_item_deletion assert_match /"github" is gone forever/, command('urls github delete') + end + + def test_edit + Boom::Command.stubs(:system).returns('') + assert_match 'Make your edits', command('edit') end end