tu-context 0.5.7

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.
@@ -0,0 +1,24 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+
3
+ class TestSharedLifecycle < Test::Unit::TestCase
4
+
5
+ shared "battery is ok" do
6
+ test "battery should be ok" do
7
+ assert_equal :ok, @battery
8
+ end
9
+ end
10
+
11
+ context "starting a car" do
12
+ before do
13
+ @battery = :ok
14
+ @engine = :off
15
+ end
16
+
17
+ uses_examples_from "battery is ok"
18
+
19
+ test "engine should be off" do
20
+ assert_equal :off, @engine
21
+ end
22
+ end
23
+
24
+ end
@@ -0,0 +1,23 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+
3
+ class TestTest < Test::Unit::TestCase
4
+ def test_test_aliases
5
+ [:test, :it, :should, :tests].each do |method_alias|
6
+ assert self.class.respond_to?(method_alias)
7
+ end
8
+ end
9
+
10
+ def test_before_test_aliases
11
+ [:before_test, :before_it, :before_should, :before_tests].each do |method_alias|
12
+ assert self.class.respond_to?(method_alias), method_alias.inspect
13
+ end
14
+ end
15
+
16
+ context "A test block" do
17
+ it "should create a test_xxx method" do
18
+ self.class.test("should create a test method") { true }
19
+
20
+ assert self.respond_to?("test: A test block should create a test method")
21
+ end
22
+ end
23
+ end
metadata ADDED
@@ -0,0 +1,108 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tu-context
3
+ version: !ruby/object:Gem::Version
4
+ hash: 5
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 5
9
+ - 7
10
+ version: 0.5.7
11
+ platform: ruby
12
+ authors:
13
+ - Jeremy McAnally
14
+ - Rails Core
15
+ - Pratik Naik
16
+ autorequire:
17
+ bindir: bin
18
+ cert_chain: []
19
+
20
+ date: 2010-07-02 00:00:00 -04:00
21
+ default_executable:
22
+ dependencies: []
23
+
24
+ description: If you've ever wanted contexts in your Test::Unit tests, then context is for you. Your tests will be easier to read and write without all the magic and extra code smell!
25
+ email: jeremymcanally@gmail.com
26
+ executables: []
27
+
28
+ extensions: []
29
+
30
+ extra_rdoc_files:
31
+ - README.rdoc
32
+ files:
33
+ - .document
34
+ - .gitignore
35
+ - History.txt
36
+ - License.txt
37
+ - Manifest.txt
38
+ - PostInstall.txt
39
+ - README.rdoc
40
+ - Rakefile
41
+ - VERSION
42
+ - config/hoe.rb
43
+ - config/requirements.rb
44
+ - context.gemspec
45
+ - countloc.rb
46
+ - lib/context.rb
47
+ - lib/context/context.rb
48
+ - lib/context/core_ext/rails_hacks.rb
49
+ - lib/context/core_ext/string.rb
50
+ - lib/context/lifecycle.rb
51
+ - lib/context/shared_behavior.rb
52
+ - lib/context/suite.rb
53
+ - lib/context/test.rb
54
+ - lib/context/version.rb
55
+ - setup.rb
56
+ - tasks/deployment.rake
57
+ - tasks/environment.rake
58
+ - test/test_context.rb
59
+ - test/test_core_ext.rb
60
+ - test/test_helper.rb
61
+ - test/test_lifecycle.rb
62
+ - test/test_nested_lifecycle.rb
63
+ - test/test_shared.rb
64
+ - test/test_shared_lifecycle.rb
65
+ - test/test_test.rb
66
+ has_rdoc: true
67
+ homepage: http://github.com/djsun/tu-context
68
+ licenses: []
69
+
70
+ post_install_message:
71
+ rdoc_options:
72
+ - --charset=UTF-8
73
+ require_paths:
74
+ - lib
75
+ required_ruby_version: !ruby/object:Gem::Requirement
76
+ none: false
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ hash: 3
81
+ segments:
82
+ - 0
83
+ version: "0"
84
+ required_rubygems_version: !ruby/object:Gem::Requirement
85
+ none: false
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ hash: 3
90
+ segments:
91
+ - 0
92
+ version: "0"
93
+ requirements: []
94
+
95
+ rubyforge_project:
96
+ rubygems_version: 1.3.7
97
+ signing_key:
98
+ specification_version: 3
99
+ summary: Adds context blocks for Test::Unit
100
+ test_files:
101
+ - test/test_context.rb
102
+ - test/test_core_ext.rb
103
+ - test/test_helper.rb
104
+ - test/test_lifecycle.rb
105
+ - test/test_nested_lifecycle.rb
106
+ - test/test_shared.rb
107
+ - test/test_shared_lifecycle.rb
108
+ - test/test_test.rb