test-belt 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -31,7 +31,8 @@ TestBelt only impacts your testing environment or setup and is designed only for
31
31
  Using the TestBelt test helper loads in the testing libraries I like and use. In your test files or a common test helper file, require in the helper:
32
32
  require 'test_belt/helper'
33
33
 
34
- This will give you the following:
34
+ This will give you the following tools. I use most of these helpers in testing this gem. To see examples of these in action, peruse this gem's test files (https://github.com/kelredd/test-belt/tree/master/test) and run the test suite with:
35
+ $ rake test
35
36
 
36
37
  === Test::Unit
37
38
  just write Test::Unit tests with assertions
@@ -45,19 +46,23 @@ https://github.com/thoughtbot/shoulda
45
46
  === Shoulda enhancements
46
47
  I've added some handy macros and extensions to some things Shoulda does. None of these are required so just use them as you see fit. Here's a sampling of what is added:
47
48
  * Class interface macros:
48
- ** should_have_class_methods
49
- ** should_have_readers
50
- ** etc
49
+ * should_have_class_methods
50
+ * should_have_readers
51
+ * etc
51
52
  * Files macros:
52
- ** should_have_files
53
- ** should_have_directories
54
- ** etc
53
+ * should_have_files
54
+ * should_have_directories
55
+ * etc
55
56
  * Context macros:
56
- ** before/after aliases for setup/teardown
57
- ** etc
58
-
59
- I use most of these helpers in testing this gem. To see examples of these in action, peruse this gem's test files and run the test suite with:
60
- $ rake test
57
+ * before/after aliases for setup/teardown
58
+ * etc
59
+
60
+ === Additional Test::Unit context callbacks
61
+ I've added some contexts callbacks in addition to the setup/teardown callbacks Shoulda provides:
62
+ * setup_once / before_once - runs one time before any of the tests in the test case are run
63
+ * teardown_once / after_once - runs one time after all of the tests in the test case are run
64
+ * suite_started / on_suite_started - runs one time before any of the tests across the entire test suite are run
65
+ * suite_finished / on_suite_finished - runs one time after all of the tests across the entire test suite are run
61
66
 
62
67
  == Rake tasks for running tests
63
68
  TestBelt can provide an automatic set of rake tasks for testing subsets of your code base. These tasks are defined based on the structure of your test files. To use this first add this to your Rakefile:
data/Rakefile CHANGED
@@ -9,19 +9,15 @@ spec = Gem::Specification.new do |s|
9
9
  s.has_rdoc = true
10
10
  s.extra_rdoc_files = %w(README.rdoc)
11
11
  s.rdoc_options = %w(--main README.rdoc)
12
- s.summary = "A library for using testing tools I like - my Ruby testing toolbelt."
12
+ s.summary = "A gem for using testing tools I like - my Ruby testing toolbelt."
13
13
  s.author = 'Kelly Redding'
14
14
  s.email = 'kelly@kelredd.com'
15
15
  s.homepage = 'http://github.com/kelredd/test-belt'
16
16
  s.files = %w(README.rdoc Rakefile) + Dir.glob("{lib}/**/*")
17
- # s.executables = ['test-belt']
18
17
 
19
- s.add_development_dependency("shoulda", [">= 2.10.0"])
20
- s.add_development_dependency("leftright", [">= 0.0.6"])
21
- s.add_development_dependency("kelredd-useful", [">= 0.4.0"])
22
- s.add_development_dependency("kelredd-simple-gem", [">= 0.7.0"])
23
-
24
- # s.add_dependency("gem-name", [">= 0"])
18
+ s.add_dependency("shoulda", ["~> 2.11"])
19
+ s.add_dependency("leftright", ["~> 0.9.0"])
20
+ s.add_dependency("kelredd-useful", ["~> 0.4.0"])
25
21
  end
26
22
 
27
23
  Rake::GemPackageTask.new(spec) do |pkg|
@@ -3,3 +3,4 @@ require 'test/unit'
3
3
  require 'leftright'
4
4
  require 'shoulda'
5
5
  require 'test_belt/shoulda_macros'
6
+ require 'test_belt/test_unit'
@@ -0,0 +1,7 @@
1
+ require 'test/unit'
2
+
3
+ module TestBelt; end
4
+ module TestBelt::TestUnit; end
5
+
6
+ require 'test_belt/test_unit/context'
7
+
@@ -1,13 +1,13 @@
1
1
  module TestBelt
2
2
  module Version
3
-
3
+
4
4
  MAJOR = 0
5
5
  MINOR = 1
6
- TINY = 0
7
-
6
+ TINY = 1
7
+
8
8
  def self.to_s # :nodoc:
9
9
  [MAJOR, MINOR, TINY].join('.')
10
10
  end
11
-
11
+
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-belt
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kelly Redding
@@ -24,15 +24,14 @@ dependencies:
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ">="
27
+ - - ~>
28
28
  - !ruby/object:Gem::Version
29
- hash: 39
29
+ hash: 21
30
30
  segments:
31
31
  - 2
32
- - 10
33
- - 0
34
- version: 2.10.0
35
- type: :development
32
+ - 11
33
+ version: "2.11"
34
+ type: :runtime
36
35
  version_requirements: *id001
37
36
  - !ruby/object:Gem::Dependency
38
37
  name: leftright
@@ -40,15 +39,15 @@ dependencies:
40
39
  requirement: &id002 !ruby/object:Gem::Requirement
41
40
  none: false
42
41
  requirements:
43
- - - ">="
42
+ - - ~>
44
43
  - !ruby/object:Gem::Version
45
- hash: 19
44
+ hash: 59
46
45
  segments:
47
46
  - 0
47
+ - 9
48
48
  - 0
49
- - 6
50
- version: 0.0.6
51
- type: :development
49
+ version: 0.9.0
50
+ type: :runtime
52
51
  version_requirements: *id002
53
52
  - !ruby/object:Gem::Dependency
54
53
  name: kelredd-useful
@@ -56,7 +55,7 @@ dependencies:
56
55
  requirement: &id003 !ruby/object:Gem::Requirement
57
56
  none: false
58
57
  requirements:
59
- - - ">="
58
+ - - ~>
60
59
  - !ruby/object:Gem::Version
61
60
  hash: 15
62
61
  segments:
@@ -64,24 +63,8 @@ dependencies:
64
63
  - 4
65
64
  - 0
66
65
  version: 0.4.0
67
- type: :development
66
+ type: :runtime
68
67
  version_requirements: *id003
69
- - !ruby/object:Gem::Dependency
70
- name: kelredd-simple-gem
71
- prerelease: false
72
- requirement: &id004 !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- hash: 3
78
- segments:
79
- - 0
80
- - 7
81
- - 0
82
- version: 0.7.0
83
- type: :development
84
- version_requirements: *id004
85
68
  description:
86
69
  email: kelly@kelredd.com
87
70
  executables: []
@@ -101,6 +84,7 @@ files:
101
84
  - lib/test_belt/shoulda_macros.rb
102
85
  - lib/test_belt/test_unit/context.rb
103
86
  - lib/test_belt/test_unit/runner.rb
87
+ - lib/test_belt/test_unit.rb
104
88
  - lib/test_belt/version.rb
105
89
  - lib/test_belt.rb
106
90
  has_rdoc: true
@@ -137,6 +121,6 @@ rubyforge_project:
137
121
  rubygems_version: 1.3.7
138
122
  signing_key:
139
123
  specification_version: 3
140
- summary: A library for using testing tools I like - my Ruby testing toolbelt.
124
+ summary: A gem for using testing tools I like - my Ruby testing toolbelt.
141
125
  test_files: []
142
126