runoff 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 68f134e0964050cf348514719437dde550790071
4
- data.tar.gz: 23af26df004e1810c9a6b937ca161932eb157ef1
3
+ metadata.gz: 2cbece2f0614ed17f5c62f98227f7c000e3b7985
4
+ data.tar.gz: f10c4978d07c72e9e004d7bbdb9647c54f36bc32
5
5
  SHA512:
6
- metadata.gz: ff8e74e3aab2ec0a04d05c08e9544afc4fffeadf1d479549a45349627aeb200e9db76afb3ef52be5113f06ae1733289928d8f8416efd0c07110e6065d7c85963
7
- data.tar.gz: f286bd9541f12f7b5b9ab04b2f3e6c2670b8cf27bb15b0c8ef56a979005f717e774bea8473f54f073691b51343d7038e5ef58ca65914ef68cfd164f845f42a0d
6
+ metadata.gz: b086d0b09ba49f49d81a376d7c4c0f8c56aa2f9f6f4ecc04851046129f53567ae07a70adb05b48bc8342f5cbc921f65c88b275f893fb05d385fd02db8c0f6bb3
7
+ data.tar.gz: 9b149cab21193959a02575b6ad5111a63b9b71e80e21817cc5ad7dace585db70018f12f9131511d42b15f13b8083a34239566c502ae3d155bf342ab0a42edc22
data/README.md CHANGED
@@ -26,7 +26,7 @@ To export specific chats.
26
26
 
27
27
  runoff chat skype_username
28
28
 
29
- If you don't want to put files into an archive, use `--no-archive` option
29
+ If you don't want to put files into an archive, use `-a` option
30
30
 
31
31
  runoff all skype_username -a false
32
32
 
@@ -34,7 +34,6 @@ If you don't want to put files into an archive, use `--no-archive` option
34
34
 
35
35
  Things to do in the future versions:
36
36
 
37
- - Refactore tests (move from MiniTest::Spec to MiniTest::Unit).
38
37
  - Parse body_xml to filter XML tags and character entities.
39
38
  - Append only new messages to the previously genetrated files instead of appending everything or create different versions for the files when using `-a false` option.
40
39
  - Add some colors.
@@ -28,6 +28,10 @@ module Runoff
28
28
  if RbConfig::CONFIG['host_os'] =~ /mingw/
29
29
  location = "#{ENV['APPDATA']}\\Skype\\#{skype_username}\\main.db"
30
30
 
31
+ unless File.exist?("#{ENV['APPDATA']}\\Skype")
32
+ location = self.get_default_skype_data_location_on_windows_8 skype_username
33
+ end
34
+
31
35
  location.gsub!(/\\/, '/')
32
36
  location.gsub(/^[a-zA-Z]:/, '')
33
37
  elsif RbConfig::CONFIG['host_os'] =~ /linux/
@@ -36,5 +40,30 @@ module Runoff
36
40
  "#{ENV['HOME']}/Library/Application Support/Skype/#{skype_username}/main.db"
37
41
  end
38
42
  end
43
+
44
+ private
45
+
46
+ # Public: Composes the default Skype database location for the Windows 8 operating system.
47
+ #
48
+ # skype_username - A String that contains a username of the Skype account,
49
+ # which database we want to access.
50
+ #
51
+ # Examples
52
+ #
53
+ # get_default_skype_data_location_on_windows_8 skype_username
54
+ # # => C:/Users/user/AppData/Local/Packages/Microsoft.SkypeApp_sakjhds8asd/LocalState/skype_username/main.db
55
+ #
56
+ # Returns a String that contains the path to the Skype database file.
57
+ def self.get_default_skype_data_location_on_windows_8(skype_username)
58
+ location = "#{ENV['HOME']}/AppData/Local/Packages"
59
+
60
+ Dir["#{location}/*"].each do |item|
61
+ if item =~ /Microsoft\.SkypeApp/
62
+ location = "#{item}/LocalState/#{skype_username}/main.db"
63
+ end
64
+ end
65
+
66
+ location
67
+ end
39
68
  end
40
69
  end
@@ -1,3 +1,3 @@
1
1
  module Runoff
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
data/test/all_test.rb CHANGED
@@ -1,25 +1,37 @@
1
- require 'minitest/spec'
2
1
  require 'minitest/autorun'
2
+ require 'minitest/unit'
3
3
  require 'runoff'
4
+ require 'fileutils'
4
5
 
5
- describe Runoff::Commands::All do
6
- it 'must output an error message if no username or --from option is provided' do
7
- ->{ Runoff::Commands::All.process [] }.must_output "You must specify a username or a --from option\n"
8
- end
6
+ class TestAll < MiniTest::Test
7
+ def teardown
8
+ Dir.glob('test/*.zip').each do |archive|
9
+ File.delete archive
10
+ end
9
11
 
10
- it 'must output result of the command' do
11
- ->{ Runoff::Commands::All.process [], {
12
- from: 'test/test_db.sqlite', destination: 'test/tmp' }
13
- }.must_output "Finished: 2 files were exported\n"
12
+ FileUtils.rm_rf 'test/tmp'
14
13
  end
15
14
 
16
- it 'must put exported files into an archive' do
17
- capture_io { Runoff::Commands::All.process [], { from: 'test/test_db.sqlite', destination: 'test/tmp' } }
15
+ def test_must_output_an_error_message_if_no_username_or_from_option_is_provided
16
+ assert_output "You must specify a username or a --from option\n" do
17
+ Runoff::Commands::All.process []
18
+ end
19
+ end
18
20
 
19
- Dir["test/*.zip"].length.must_equal 1
21
+ def test_must_output_result_of_the_command
22
+ assert_output "Finished: 2 files were exported\n" do
23
+ Runoff::Commands::All.process [], {
24
+ from: 'test/test_db.sqlite',
25
+ destination: 'test/tmp'
26
+ }
27
+ end
28
+ end
20
29
 
21
- Dir.glob('test/*.zip').each do |archive|
22
- File.delete archive
30
+ def test_must_put_exported_files_into_an_archive
31
+ capture_io do
32
+ Runoff::Commands::All.process [], { from: 'test/test_db.sqlite', destination: 'test/tmp' }
23
33
  end
34
+
35
+ assert_equal 1, Dir["test/*.zip"].length, "test directory must contain 1 Zip file"
24
36
  end
25
37
  end
data/test/chat_test.rb CHANGED
@@ -1,9 +1,11 @@
1
- require 'minitest/spec'
2
1
  require 'minitest/autorun'
2
+ require 'minitest/unit'
3
3
  require 'runoff'
4
4
 
5
- describe Runoff::Commands::Chat do
6
- it 'must output an error message if no username or --from option is provided' do
7
- ->{ Runoff::Commands::Chat.process [] }.must_output "You must specify a username or a --from option\n"
5
+ class TestChat < MiniTest::Test
6
+ def test_must_output_an_error_message_if_no_username_or_from_option_is_procided
7
+ assert_output "You must specify a username or a --from option\n" do
8
+ Runoff::Commands::Chat.process []
9
+ end
8
10
  end
9
11
  end
data/test/command_test.rb CHANGED
@@ -1,29 +1,41 @@
1
- require 'minitest/spec'
2
1
  require 'minitest/autorun'
2
+ require 'minitest/unit'
3
3
  require 'runoff'
4
4
 
5
- describe Runoff::Commands::Command do
6
- it 'must create a Composition object based on the Skype username or a specific path' do
7
- Runoff::Commands::Command.send(:get_composition, nil, 'test/test_db.sqlite').must_be_instance_of Runoff::Composition
5
+ class TestCommand < MiniTest::Test
6
+ def test_must_create_a_composition_object_based_on_a_specified_path_to_database_file
7
+ assert_instance_of Runoff::Composition, Runoff::Commands::Command.send(:get_composition, nil, 'test/test_db.sqlite')
8
8
  end
9
9
 
10
- it 'must return a default destination path if no optional path is specified' do
11
- Runoff::Commands::Command.send(:get_destination, nil).must_equal "#{ENV['HOME']}/skype-backup"
10
+ def test_must_return_a_default_destination_path_if_no_optional_path_is_specified
11
+ assert_equal "#{ENV['HOME']}/skype-backup", Runoff::Commands::Command.send(:get_destination, nil)
12
12
  end
13
13
 
14
- it 'must return a custom path if an optional path variable is specified' do
15
- path = Runoff::Commands::Command.send(:get_destination, 'test/test_db.sqlite')
16
- path.must_equal 'test/test_db.sqlite'
14
+ def test_must_return_a_custom_path_if_an_optional_path_is_specified
15
+ path = Runoff::Commands::Command.send :get_destination, 'test/test_db.sqlite'
16
+
17
+ assert_equal 'test/test_db.sqlite', path
17
18
  end
18
19
 
19
- it 'must output correct message based on the exported items count' do
20
- ->{ Runoff::Commands::Command.send(:print_result, 1) }.must_output "Finished: 1 file was exported\n"
21
- ->{ Runoff::Commands::Command.send(:print_result, 2) }.must_output "Finished: 2 files were exported\n"
20
+ def test_must_output_correct_message_based_on_the_exported_items_count
21
+ assert_output "Finished: 1 file was exported\n" do
22
+ Runoff::Commands::Command.send :print_result, 1
23
+ end
24
+
25
+ assert_output "Finished: 2 files were exported\n" do
26
+ Runoff::Commands::Command.send :print_result, 2
27
+ end
22
28
  end
23
29
 
24
- it 'must output a list of available chatnames' do
30
+ def test_must_output_a_list_of_available_chatnames
25
31
  chatnames = ['first-chatname', 'second-chatname']
26
32
 
27
- ->{ Runoff::Commands::Command.send(:list_chatnames, chatnames) }.must_output "[0] first-chatname\n[1] second-chatname\n\n"
33
+ assert_output "[0] first-chatname\n[1] second-chatname\n\n" do
34
+ Runoff::Commands::Command.send :list_chatnames, chatnames
35
+ end
36
+ end
37
+
38
+ def test_does_not_create_an_archive_if_the_archive_option_is_set_to_false
39
+ skip
28
40
  end
29
41
  end
@@ -1,53 +1,58 @@
1
- require 'minitest/spec'
2
1
  require 'minitest/autorun'
2
+ require 'minitest/unit'
3
3
  require 'runoff'
4
4
  require 'fileutils'
5
5
 
6
- describe Runoff::Composition do
7
- before { @composition = Runoff::Composition.new 'test/test_db.sqlite' }
6
+ class TestComposition < MiniTest::Test
7
+ def setup
8
+ @composition = Runoff::Composition.new 'test/test_db.sqlite'
9
+ end
10
+
11
+ def teardown
12
+ FileUtils.rm_rf 'test/tmp'
13
+ end
8
14
 
9
- it "must raise an IOError if the file that is passed to the constructor doesn't exist" do
10
- ->{ composition = Runoff::Composition.new 'not_existing.db' }.must_raise IOError
15
+ def test_must_raise_an_IOError_if_the_file_that_is_passed_to_the_constructor_does_not_exist
16
+ assert_raises IOError do
17
+ composition = Runoff::Composition.new 'not_existing.db'
18
+ end
11
19
  end
12
20
 
13
- it 'must have a getter method for exported filenames' do
14
- @composition.must_respond_to :exported_filenames
21
+ def test_must_respond_to_exported_filenames_method
22
+ assert_respond_to @composition, :exported_filenames
15
23
  end
16
24
 
17
- it 'must return parsed chatnames together with partly parsed chatnames' do
25
+ def test_must_return_parsed_chatnames_together_with_partly_parsed_chatnames
18
26
  chatnames, raw_chatnames = @composition.get_chatnames
19
27
 
20
- chatnames.must_equal ['something-more', 'something-else']
21
- raw_chatnames.must_equal ['#something/$more;', '#something/$else;']
28
+ assert_equal ['something-more', 'something-else'], chatnames
29
+ assert_equal ['#something/$more;', '#something/$else;'], raw_chatnames
22
30
  end
23
31
 
24
- it 'must return a count of the exported filenames' do
32
+ def test_must_return_a_count_of_the_exported_filenames
25
33
  file_count = @composition.send(
26
34
  :run_export,
27
35
  [{
28
- chatname: '#test/$one;7687623',
36
+ chatname: '#john/$elis;7687623',
29
37
  timestamp: 123123213,
30
- from_dispname: 'Aidzis',
38
+ from_dispname: 'John',
31
39
  body_xml: ''
32
40
  }],
33
41
  'test/tmp'
34
42
  )
35
43
 
36
- file_count.must_equal 1
37
- FileUtils.rm_rf 'test/tmp'
44
+ assert_equal 1, file_count
38
45
  end
39
46
 
40
- it 'must return a count of the exported filenames when called for all chats' do
47
+ def test_must_return_a_count_of_the_exported_filenames_when_called_for_all_chats
41
48
  file_count = @composition.export 'test/tmp'
42
49
 
43
- file_count.must_equal 2
44
- FileUtils.rm_rf 'test/tmp'
50
+ assert_equal 2, file_count
45
51
  end
46
52
 
47
- it 'must return a count of the exported filenames when called for specific chats' do
53
+ def test_must_return_a_count_of_the_exported_filenames_when_called_for_specific_chats
48
54
  file_count = @composition.export_chats ['#something/$more;', '#something/$else;'], 'test/tmp'
49
55
 
50
- file_count.must_equal 2
51
- FileUtils.rm_rf 'test/tmp'
56
+ assert_equal 2, file_count
52
57
  end
53
58
  end
@@ -1,80 +1,90 @@
1
+ require 'minitest/autorun'
1
2
  require 'minitest/unit'
2
3
  require 'runoff'
3
4
  require 'fileutils'
4
5
 
5
- describe Runoff::FileWriter do
6
- before do
6
+ class TestFileWriter < MiniTest::Test
7
+ def setup
7
8
  @incorrect_chat_record = {
8
9
  chatname: '#john/$;521357125362',
9
10
  timestamp: 1366280218,
10
- from_dispname: 'Aidzis',
11
+ from_dispname: 'John',
11
12
  body_xml: 'This is a text'
12
13
  }
13
14
 
14
15
  @chat_record = {
15
16
  chatname: '#braun/$drake;521357125362',
16
17
  timestamp: 1366280218,
17
- from_dispname: 'Aidzis',
18
+ from_dispname: 'Braun',
18
19
  body_xml: 'This is a text.'
19
20
  }
20
21
 
21
- correct_format = MiniTest::Mock.new
22
-
23
- correct_format.expect :get_filename, 'something-more', [Hash]
24
- correct_format.expect :get_filename, 'something-more', [Hash]
25
- correct_format.expect :build_entry, '[2013-04-18 13:16:58] Aidzis: This is a text.', [Hash]
26
- correct_format.expect :build_entry, '[2013-04-18 13:16:58] Aidzis: This is a text.', [Hash]
27
-
22
+ correct_format = get_correct_format_mock
28
23
  @correct_file_writer = Runoff::FileWriter.new correct_format
29
-
30
- incorrect_format = MiniTest::Mock.new
31
-
32
- incorrect_format.expect :get_filename, 'something', [Hash]
33
- incorrect_format.expect :build_entry, '[2013-04-18 13:16:58] Aidzis: This is a text.', [Hash]
34
-
24
+ incorrect_format = get_incorrect_format_mock
35
25
  @incorrect_file_writer = Runoff::FileWriter.new incorrect_format
36
26
  end
37
27
 
38
- describe "#save_to_file" do
39
- after do
40
- FileUtils.rm_rf 'test/tmp'
41
- Dir.glob('test/*.zip').each do |archive|
42
- File.delete archive
43
- end
44
- end
28
+ def teardown
29
+ FileUtils.rm_rf 'test/tmp'
45
30
 
46
- it 'must write chat content to file' do
47
- @correct_file_writer.save_to_file @chat_record, 'test/tmp'
48
- @incorrect_file_writer.save_to_file @incorrect_chat_record, 'test/tmp'
49
- Dir.glob('test/tmp/*.txt').count.must_equal 2
31
+ Dir.glob('test/*.zip').each do |archive|
32
+ File.delete archive
50
33
  end
34
+ end
51
35
 
52
- it 'must append to a file if the filename already exists' do
53
- @additional_chat_record = @chat_record
36
+ def test_must_write_chat_content_to_file
37
+ @correct_file_writer.save_to_file @chat_record, 'test/tmp'
38
+ @incorrect_file_writer.save_to_file @incorrect_chat_record, 'test/tmp'
54
39
 
55
- @correct_file_writer.save_to_file @chat_record, 'test/tmp'
56
- @incorrect_file_writer.save_to_file @incorrect_chat_record, 'test/tmp'
57
- @correct_file_writer.save_to_file @additional_chat_record, 'test/tmp'
58
- Dir.glob('test/tmp/*.txt').count.must_equal 2
59
- end
40
+ assert_equal 2, Dir['test/tmp/*.txt'].count
41
+ end
42
+
43
+ def test_must_append_to_a_file_if_the_filename_already_exists
44
+ @additional_chat_record = @chat_record
45
+
46
+ @correct_file_writer.save_to_file @chat_record, 'test/tmp'
47
+ @incorrect_file_writer.save_to_file @incorrect_chat_record, 'test/tmp'
48
+ @correct_file_writer.save_to_file @additional_chat_record, 'test/tmp'
49
+
50
+ assert_equal 2, Dir['test/tmp/*.txt'].count
60
51
  end
61
52
 
62
- it 'must create a Zip file of the file output directory' do
53
+ def test_must_create_a_zip_file_of_the_destination_directory
63
54
  output_directory = 'test/tmp'
64
55
  files = %w[first.txt second.txt]
65
56
 
66
57
  Dir.mkdir(output_directory) unless File.exists?(output_directory)
58
+
67
59
  files.each do |filename|
68
- File.new "#{output_directory}/#{filename}", 'w'
60
+ file = File.new "#{output_directory}/#{filename}", 'w'
61
+ file.close
69
62
  end
70
63
 
71
64
  Runoff::FileWriter.archive output_directory
72
- Dir["test/*.zip"].length.must_equal 1
73
65
 
74
- Dir.glob('test/*.zip').each do |archive|
75
- File.delete archive
76
- end
66
+ assert_equal 1, Dir['test/*.zip'].count
67
+ end
77
68
 
78
- FileUtils.rm_rf 'test/tmp'
69
+ private
70
+
71
+ def get_correct_format_mock
72
+ correct_format = MiniTest::Mock.new
73
+
74
+ correct_format.expect :get_filename, 'braun-drake.txt', [Hash]
75
+ correct_format.expect :get_filename, 'braun-drake.txt', [Hash]
76
+ correct_format.expect :build_entry, '[2013-04-18 13:16:58] Braun: This is a text.', [Hash]
77
+ correct_format.expect :build_entry, '[2013-04-18 13:16:58] Braun: This is a text.', [Hash]
78
+
79
+ correct_format
80
+ end
81
+
82
+ def get_incorrect_format_mock
83
+ incorrect_format = MiniTest::Mock.new
84
+
85
+ incorrect_format.expect :get_filename, 'john.txt', [Hash]
86
+ incorrect_format.expect :build_entry, '[2013-04-18 13:16:58] John: This is a text.', [Hash]
87
+
88
+ incorrect_format
79
89
  end
80
90
  end
@@ -1,19 +1,23 @@
1
- require 'minitest/spec'
2
1
  require 'minitest/autorun'
2
+ require 'minitest/unit'
3
3
  require 'runoff'
4
4
 
5
- describe Runoff::Location do
6
- describe '.default_skype_data_location' do
7
- it 'must return a default path depending on the operating system' do
8
- path = Runoff::Location.default_skype_data_location 'aidzis_skype'
5
+ class TestLocation < MiniTest::Test
6
+ def setup
7
+ @path = Runoff::Location.default_skype_data_location 'aidzis_skype'
8
+ end
9
9
 
10
- if RbConfig::CONFIG['host_os'] =~ /mingw/
11
- path.must_match /\/Users\/[a-zA-Z0-9]+\/AppData\/Roaming\/Skype\/aidzis_skype\/main\.db/
12
- elsif RbConfig::CONFIG['host_os'] =~ /linux/
13
- path.must_match /\/home\/[a-zA-Z0-9]+\/\.Skype\/aidzis_skype\/main\.db/
10
+ def test_must_return_a_default_path_depending_on_the_operating_system
11
+ if RbConfig::CONFIG['host_os'] =~ /mingw/
12
+ if File.exist?("#{ENV['APPDATA']}\\Skype")
13
+ assert_match /\/Users\/[a-zA-Z0-9]+\/AppData\/Roaming\/Skype\/aidzis_skype\/main\.db/, @path
14
14
  else
15
- path.must_match /~\/Library\/Application Support\/Skype\/aidzis_skype\/main\.db/
15
+ assert_match /\/Users\/[a-zA-Z0-9]+\/AppData\/Local\/Packages\/[a-zA-Z0-9_\/\.]+\/aidzis_skype\/main\.db/, @path
16
16
  end
17
+ elsif RbConfig::CONFIG['host_os'] =~ /linux/
18
+ assert_match /\/home\/[a-zA-Z0-9]+\/\.Skype\/aidzis_skype\/main\.db/, @path
19
+ else
20
+ assert_match /~\/Library\/Application Support\/Skype\/aidzis_skype\/main\.db/, @path
17
21
  end
18
22
  end
19
23
  end
@@ -1,70 +1,71 @@
1
- require 'minitest/spec'
2
1
  require 'minitest/autorun'
2
+ require 'minitest/unit'
3
3
  require 'runoff'
4
4
 
5
- describe Runoff::SkypeDataFormat do
6
- before do
5
+ class TestSkypeDataFormat < MiniTest::Test
6
+ def setup
7
7
  @format = Runoff::SkypeDataFormat.new
8
8
  end
9
9
 
10
- it 'must return a valid filename from a hash (single record in a database)' do
10
+ def test_must_return_a_valid_filename_from_a_hash
11
11
  record = { chatname: '#brian/$john;521357125362' }
12
12
  filename = @format.get_filename record
13
13
 
14
- filename.must_equal 'brian-john.txt'
14
+ assert_equal 'brian-john.txt', filename
15
15
  end
16
16
 
17
- it 'must build a string from the necessary database record columns' do
17
+ def test_must_build_a_string_from_the_necessary_database_record_columns
18
18
  record = {
19
19
  chatname: '#brian/$john;521357125362',
20
20
  timestamp: 1366280218,
21
21
  from_dispname: 'Aidzis',
22
22
  body_xml: 'This is a text.'
23
23
  }
24
+
24
25
  entry = @format.build_entry record
25
26
 
26
- entry.must_equal '[2013-04-18 13:16:58] Aidzis: This is a text.'
27
+ assert_equal '[2013-04-18 13:16:58] Aidzis: This is a text.', entry
27
28
  end
28
29
 
29
- it 'must return a valid and readable name from a raw chatname' do
30
+ def test_must_return_a_valid_and_readable_name_from_a_raw_chatname
30
31
  raw_chatname = '#something/$else;521357125362'
31
32
  chatname = @format.parse_chatname raw_chatname
32
33
 
33
- chatname.must_equal 'something-else'
34
+ assert_equal 'something-else', chatname
34
35
  end
35
36
 
36
- it 'must return a valid and readable name from broken chatname records' do
37
+ def test_must_return_a_valid_and_readable_name_from_a_broken_chatname_record
37
38
  raw_chatname = '#something/$521357125362'
38
39
  chatname = @format.parse_chatname raw_chatname
39
40
 
40
- chatname.must_equal 'something'
41
+ assert_equal 'something', chatname
41
42
  end
42
43
 
43
- it 'must return a chatname without the extra symbols' do
44
+ def test_must_return_a_chatname_without_the_extra_symbols
44
45
  raw_chatname = '#something/$else;521357125362'
45
46
  chatname = @format.partly_parse_chatname raw_chatname
46
47
 
47
- chatname.must_equal '#something/$else;'
48
+ assert_equal '#something/$else;', chatname
48
49
  end
49
50
 
50
- it 'must return a chatname without the extra symbols for broken chatname records' do
51
+ def test_must_return_a_chatname_without_the_extra_symbols_for_a_broken_chatname_record
51
52
  raw_chatname = '#something/$521357125362'
52
53
  chatname = @format.partly_parse_chatname raw_chatname
53
54
 
54
- chatname.must_equal '#something/$'
55
+ assert_equal '#something/$', chatname
55
56
  end
56
57
 
57
- it 'must return a string without Skype emotion XML tags' do
58
+ def test_must_return_a_string_without_skype_emotion_xml_tags
58
59
  string = 'Some text <ss type="laugh">:D</ss>'
59
60
  clean_string = @format.send :parse_body_xml, string
60
61
 
61
- clean_string.must_equal 'Some text :D'
62
+ assert_equal 'Some text :D', clean_string
62
63
  end
63
64
 
64
- it 'must remove all starting and ending dashes from a string' do
65
+ def test_must_remove_all_starting_and_ending_dashes_from_a_string
65
66
  string = '---example--'
66
67
  valid_name = @format.send :trim_dashes, string
67
68
 
68
- valid_name.must_equal 'example'
69
+ assert_equal 'example', valid_name
69
70
  end
70
71
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runoff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aigars Dzerviniks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-27 00:00:00.000000000 Z
11
+ date: 2013-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander