twtest 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -1
- data/lib/twtest.rb +7 -2
- data/lib/twtest/testcase.rb +1 -8
- data/lib/twtest/version.rb +1 -1
- data/test/unit/test_testcase.rb +2 -2
- data/twtest.gemspec +1 -0
- metadata +18 -2
data/.travis.yml
CHANGED
data/lib/twtest.rb
CHANGED
@@ -1,8 +1,13 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'tmpdir'
|
3
|
+
require 'erb'
|
4
|
+
require 'shellwords'
|
5
|
+
require 'tempfile'
|
6
|
+
require 'multi_json'
|
7
|
+
|
1
8
|
require "twtest/version"
|
2
9
|
require "twtest/testcase"
|
3
10
|
|
4
|
-
require 'tempfile'
|
5
|
-
|
6
11
|
module TaskWarrior
|
7
12
|
module Test
|
8
13
|
module Integration
|
data/lib/twtest/testcase.rb
CHANGED
@@ -1,10 +1,3 @@
|
|
1
|
-
require 'test/unit'
|
2
|
-
|
3
|
-
require 'tmpdir'
|
4
|
-
require 'erb'
|
5
|
-
require 'json'
|
6
|
-
require 'shellwords'
|
7
|
-
|
8
1
|
module TaskWarrior
|
9
2
|
module Test
|
10
3
|
module Integration
|
@@ -24,7 +17,7 @@ module TaskWarrior
|
|
24
17
|
def export_tasks(args = {})
|
25
18
|
json = task('export', args)
|
26
19
|
raise "Empty JSON returned by task command" if json.nil? || json.empty?
|
27
|
-
|
20
|
+
MultiJson.load(json)
|
28
21
|
end
|
29
22
|
|
30
23
|
def task(cmd, args = {})
|
data/lib/twtest/version.rb
CHANGED
data/test/unit/test_testcase.rb
CHANGED
@@ -15,11 +15,11 @@ class TestTestCase < TaskWarrior::Test::Integration::TestCase
|
|
15
15
|
input_file = Tempfile.new('test_simple')
|
16
16
|
|
17
17
|
begin
|
18
|
-
input_file.write(contents
|
18
|
+
input_file.write(MultiJson.dump(contents))
|
19
19
|
input_file.close
|
20
20
|
|
21
21
|
# TODO Replace temp file with in-process version
|
22
|
-
# task("import <(echo '#{contents
|
22
|
+
# task("import <(echo '#{MultiJson.dump(contents)}')")
|
23
23
|
task("import #{input_file.path}")
|
24
24
|
|
25
25
|
tasks = export_tasks
|
data/twtest.gemspec
CHANGED
@@ -14,6 +14,7 @@ Gem::Specification.new do |gem|
|
|
14
14
|
gem.require_paths = ["lib"]
|
15
15
|
gem.version = TaskWarrior::Test::Integration::VERSION
|
16
16
|
|
17
|
+
gem.add_development_dependency 'multi_json', '~> 1.3'
|
17
18
|
gem.add_development_dependency 'guard-test', '~> 0.5'
|
18
19
|
gem.add_development_dependency 'guard-bundler', '~> 1.0'
|
19
20
|
gem.add_development_dependency 'rake', '~> 0.9'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twtest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,8 +9,24 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: multi_json
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.3'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.3'
|
14
30
|
- !ruby/object:Gem::Dependency
|
15
31
|
name: guard-test
|
16
32
|
requirement: !ruby/object:Gem::Requirement
|