any-spec 0.0.0 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/any-spec.gemspec +71 -0
- data/lib/any-spec/test-runner.rb +1 -2
- data/test/unit/test_runner_test.rb +1 -7
- metadata +4 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.1
|
data/any-spec.gemspec
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{any-spec}
|
8
|
+
s.version = "0.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Aaron Gough"]
|
12
|
+
s.date = %q{2010-10-09}
|
13
|
+
s.description = %q{AnySpec is a framework for writing executable language specifications and automated black-box functional tests for programming languages.}
|
14
|
+
s.email = %q{aaron@aarongough.com}
|
15
|
+
s.executables = ["any-spec", "any-spec"]
|
16
|
+
s.extra_rdoc_files = [
|
17
|
+
"MIT-LICENSE",
|
18
|
+
"README.rdoc"
|
19
|
+
]
|
20
|
+
s.files = [
|
21
|
+
"MIT-LICENSE",
|
22
|
+
"README.rdoc",
|
23
|
+
"Rakefile",
|
24
|
+
"VERSION",
|
25
|
+
"any-spec.gemspec",
|
26
|
+
"bin/any-spec",
|
27
|
+
"lib/any-spec.rb",
|
28
|
+
"lib/any-spec/assertions.rb",
|
29
|
+
"lib/any-spec/test-case.rb",
|
30
|
+
"lib/any-spec/test-runner.rb",
|
31
|
+
"test/fixtures/example_test_specification.yml",
|
32
|
+
"test/fixtures/test_cases/empty.blah",
|
33
|
+
"test/fixtures/test_cases/error.rb",
|
34
|
+
"test/fixtures/test_cases/failing.rb",
|
35
|
+
"test/fixtures/test_cases/incorrect.blah",
|
36
|
+
"test/fixtures/test_cases/test1.rb",
|
37
|
+
"test/fixtures/test_cases/test2.rb",
|
38
|
+
"test/setup/test_unit_extensions.rb",
|
39
|
+
"test/test_helper.rb",
|
40
|
+
"test/unit/assertions_test.rb",
|
41
|
+
"test/unit/test_case_test.rb",
|
42
|
+
"test/unit/test_runner_test.rb"
|
43
|
+
]
|
44
|
+
s.homepage = %q{http://github.com/aarongough/any-spec}
|
45
|
+
s.rdoc_options = ["--charset=UTF-8", "--line-numbers", "--inline-source"]
|
46
|
+
s.require_paths = ["lib"]
|
47
|
+
s.rubygems_version = %q{1.3.7}
|
48
|
+
s.summary = %q{A framework for writing executable language specifications}
|
49
|
+
s.test_files = [
|
50
|
+
"test/fixtures/test_cases/error.rb",
|
51
|
+
"test/fixtures/test_cases/failing.rb",
|
52
|
+
"test/fixtures/test_cases/test1.rb",
|
53
|
+
"test/fixtures/test_cases/test2.rb",
|
54
|
+
"test/setup/test_unit_extensions.rb",
|
55
|
+
"test/test_helper.rb",
|
56
|
+
"test/unit/assertions_test.rb",
|
57
|
+
"test/unit/test_case_test.rb",
|
58
|
+
"test/unit/test_runner_test.rb"
|
59
|
+
]
|
60
|
+
|
61
|
+
if s.respond_to? :specification_version then
|
62
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
63
|
+
s.specification_version = 3
|
64
|
+
|
65
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
66
|
+
else
|
67
|
+
end
|
68
|
+
else
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
data/lib/any-spec/test-runner.rb
CHANGED
@@ -12,8 +12,7 @@ module AnySpec
|
|
12
12
|
|
13
13
|
def initialize( target_executable, test_specification_file )
|
14
14
|
# Verify that the target executable exists and is in the current PATH
|
15
|
-
@target_executable =
|
16
|
-
raise Exception, "The target executable you specified does not exist!" if(@target_executable.empty?)
|
15
|
+
@target_executable = target_executable.strip
|
17
16
|
# Load the test specification file
|
18
17
|
@test_specification_file = File.expand_path(test_specification_file)
|
19
18
|
raise Exception, "The test specification file you supplied does not exist." unless(File.exist? @test_specification_file)
|
@@ -9,19 +9,13 @@ class TestRunnerTest < Test::Unit::TestCase
|
|
9
9
|
|
10
10
|
test "should create new TestRunner instance" do
|
11
11
|
test_runner = AnySpec::TestRunner.new("ruby", @spec_file)
|
12
|
-
assert_equal
|
12
|
+
assert_equal 'ruby', test_runner.target_executable
|
13
13
|
assert_equal @spec["specification_root"], test_runner.specification_root
|
14
14
|
assert_equal @spec["specification_extension"], test_runner.specification_extension
|
15
15
|
assert_equal 4, test_runner.test_case_paths.length
|
16
16
|
assert_equal 4, test_runner.test_cases.length
|
17
17
|
end
|
18
18
|
|
19
|
-
test "should raise error when target executable does not exist" do
|
20
|
-
assert_raises Exception do
|
21
|
-
test_runner = AnySpec::TestRunner.new("blagitz", @spec_file)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
19
|
test "should raise error when specification file does not exist" do
|
26
20
|
assert_raises Exception do
|
27
21
|
test_runner = AnySpec::TestRunner.new("ruby", "~/blah/foo/blag.bar")
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 1
|
9
|
+
version: 0.0.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Aaron Gough
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-10-
|
17
|
+
date: 2010-10-09 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|
@@ -33,6 +33,7 @@ files:
|
|
33
33
|
- README.rdoc
|
34
34
|
- Rakefile
|
35
35
|
- VERSION
|
36
|
+
- any-spec.gemspec
|
36
37
|
- bin/any-spec
|
37
38
|
- lib/any-spec.rb
|
38
39
|
- lib/any-spec/assertions.rb
|