fun_with_testing 0.0.4 → 0.0.10
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.
- checksums.yaml +5 -13
- data/CHANGELOG.markdown +38 -0
- data/Gemfile +33 -11
- data/README.rdoc +3 -6
- data/Rakefile +38 -17
- data/VERSION +1 -1
- data/lib/fun_with/testing/assertions/basics.rb +250 -138
- data/lib/fun_with/testing/assertions_test_case.rb +67 -0
- data/lib/fun_with/testing/assertions_test_mocker.rb +15 -0
- data/lib/fun_with/testing/test_case.rb +1 -71
- data/lib/fun_with/testing/test_case_extensions.rb +47 -0
- data/lib/fun_with/testing/verbosity_methods.rb +33 -0
- data/lib/fun_with_testing.rb +16 -18
- data/test/helper.rb +3 -37
- data/test/test_assertions.rb +609 -14
- data/test/test_fun_with_testing.rb +3 -7
- data/test/test_verbosity.rb +2 -1
- metadata +19 -134
- data/lib/fun_with/testing/assertions/active_record.rb +0 -108
- data/lib/fun_with/testing/assertions/fun_with_files.rb +0 -109
- data/test/test_test_mode.rb +0 -28
checksums.yaml
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
|
|
5
|
-
data.tar.gz: !binary |-
|
|
6
|
-
MmI0Nzg3YzUzYmRjMGE5MzUzN2ZkNmVhODMyZWJmOTM2ZGJjYmI0Mw==
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: ef7ef2d783645269b6d95fae227851df1adf436d0afd48edd7bfdfa1426da282
|
|
4
|
+
data.tar.gz: ec76fa0100ad69d2a83e2f9ae30b9213a40a2671e3d5c24964559149716a11a7
|
|
7
5
|
SHA512:
|
|
8
|
-
metadata.gz:
|
|
9
|
-
|
|
10
|
-
ZGQ5ODJhMzc0NTZiYjZhNTI1NGExYzk4NDJjODkwZjQ3M2QzYzFlNDRiYTBh
|
|
11
|
-
NjM0YTA5NzVmMDE5YTc3ZGQ3YmQ0ZGJhMTQyMGIwM2QxY2FlNGE=
|
|
12
|
-
data.tar.gz: !binary |-
|
|
13
|
-
MzIyZDJiMWIxNmU3MWM5NjM4Njk5NmEyYTJkOTVlZDYyMjU2NWM4Y2NhM2Nk
|
|
14
|
-
OWZkYTRkZjA0NGM0YzQ3MWEyMTI5NTExYzMzMGYzZTNhODc1NDkxYTIyZjk5
|
|
15
|
-
NmI1MTA3YjczNDJlZjAwNDc3YzBiYzg4MDVjMmFlODlkYTNkZGQ=
|
|
6
|
+
metadata.gz: 8b9baec42232166fdd0587e4a5f4f64192c31e4cbde053aeae8cb6a43485d0360af68fca8067dcfe54b80fd75ac5d7ae07eb9206fb80b3d8b9d1930a02084ce9
|
|
7
|
+
data.tar.gz: 98580befc0b52da3259ac7020b55bd15b1395072a3b0848e2f8a27ec016a52b7e08d6a36e8cdb72373690cc3fb9f0eba3557dede1c48f9a4d04509766c96a3e8
|
data/CHANGELOG.markdown
CHANGED
|
@@ -1,6 +1,44 @@
|
|
|
1
1
|
CHANGELOG
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
v0.0.?+
|
|
5
|
+
------
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
v0.0.9
|
|
9
|
+
------
|
|
10
|
+
|
|
11
|
+
* Cleaning up documentation.
|
|
12
|
+
* Better rdoc coverage
|
|
13
|
+
* Moving TestMode into separate gem (FunWith::TestMode)
|
|
14
|
+
* What to do with "Verbosity"?
|
|
15
|
+
* added `.add_factorybot_support()` to TestCase... # conflicted about this, maybe should go in FunWith::Rails?
|
|
16
|
+
*
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
v0.0.8 (current)
|
|
20
|
+
------------------
|
|
21
|
+
|
|
22
|
+
* Mucked with the gemfile dependencies.
|
|
23
|
+
|
|
24
|
+
v0.0.7
|
|
25
|
+
------
|
|
26
|
+
|
|
27
|
+
* Moving everything related to FunWith::Files into that gem.
|
|
28
|
+
* Removing ActiveRecord stuff in preparation for Glorious FunWith::Rails Future!
|
|
29
|
+
|
|
30
|
+
v0.0.6
|
|
31
|
+
------
|
|
32
|
+
|
|
33
|
+
* Adding meat to the testing section
|
|
34
|
+
* (Temporarily?) dropping the illusion of Ruby < 2.0 support
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
v0.0.5
|
|
38
|
+
------
|
|
39
|
+
|
|
40
|
+
????? - not inspiring confidence here
|
|
41
|
+
|
|
4
42
|
v0.0.4
|
|
5
43
|
------
|
|
6
44
|
|
data/Gemfile
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
source "
|
|
1
|
+
source "https://rubygems.org"
|
|
2
|
+
|
|
2
3
|
# Add dependencies required to use your gem here.
|
|
3
4
|
# Example:
|
|
4
5
|
# gem "activesupport", ">= 2.3.5"
|
|
@@ -9,17 +10,38 @@ group :development do
|
|
|
9
10
|
# gem "shoulda", "~> 3", ">= 3.5"
|
|
10
11
|
# gem "rdoc", "~> 3.12"
|
|
11
12
|
# gem "bundler", "~> 1.0"
|
|
12
|
-
# gem "
|
|
13
|
-
# # gem "rcov", ">= 0"
|
|
13
|
+
# gem "rcov", ">= 0"
|
|
14
14
|
# gem 'debugger', "~> 1.6"
|
|
15
15
|
# gem 'minitest'
|
|
16
|
+
# gem "fun_with_testing", "~> 0.0", ">= 0.0.4"
|
|
16
17
|
end
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
gem "
|
|
21
|
-
gem "
|
|
22
|
-
|
|
23
|
-
gem "
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
# 3.6.0 => 2019-10 # most of its functionality is is shoulda-context and shoulda-matchers, which are more up to date
|
|
20
|
+
# 2020-06 # removing it seems to be causing problems. Which only started showing up now?
|
|
21
|
+
gem "shoulda", ">= 4" # 2024-11 curently at 4.0.0 (been ages since it was updated, I guess.)
|
|
22
|
+
# gem "shoulda-matchers" # 2024-11 currently at
|
|
23
|
+
gem "shoulda-context" # 2024-11 currently at 2.0
|
|
24
|
+
gem "rdoc", ">= 6" # 6.7 as of 2024-11
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# 2021-06 : I've run into this issue where newer versions of the TTY gem are blocking on newer bundler versions. I'm first going to try dropping the "~>2"
|
|
29
|
+
# and if that doesn't work, delete the dependency entirely.
|
|
30
|
+
# 2025-03 : I'm getting a weird message about a method redefinition. Gonna try nailing this to the absolute most recent
|
|
31
|
+
# version and seeing what happens.
|
|
32
|
+
#
|
|
33
|
+
# I guess I solved the default bundler problem by doing gem update --system 3.3.6 (apparently the latest version)
|
|
34
|
+
# ... and also remove all the old versions of bundler
|
|
35
|
+
# gem "bundler", ">= 2.7" # RVM comes with its own version of Bundler that's taking precedence, so can't really nail down a version
|
|
36
|
+
|
|
37
|
+
gem "juwelier", ">= 2" # 2.4.9 => 2019-10
|
|
38
|
+
# gem "simplecov", ">= 0" # 0.22 as of 2024-11
|
|
39
|
+
# gem 'byebug', "~> 10" # 9.0.6 => 2016-09-30
|
|
40
|
+
gem 'minitest', ">= 6" # 6.0.1 (2025-12-30)
|
|
41
|
+
|
|
42
|
+
# making some of the dependencies more specific than the previously listed gems demand
|
|
43
|
+
# okay, Past Bryce. Thanks for telling me you did that. But screw you for not trying to explain why.
|
|
44
|
+
# gem 'json', "~> 2", ">= 2.0.3"
|
|
45
|
+
# gem 'nokogiri', ">= 1.16"
|
|
46
|
+
|
|
47
|
+
gem 'debug'
|
data/README.rdoc
CHANGED
|
@@ -5,16 +5,13 @@ A bunch of useful assertions, and a subclass of Test::Unit::TestCase for my gems
|
|
|
5
5
|
Usage:
|
|
6
6
|
|
|
7
7
|
# This might go in test/helper.rb, for example
|
|
8
|
-
class GemTestCase <
|
|
9
|
-
|
|
10
|
-
# include FunWith::Testing::Assertions::Basics # alternately, just include tests piecemeal
|
|
11
|
-
# include FunWith::Testing::Assertions::ActiveRecord # alternately, just include tests piecemeal
|
|
12
|
-
# include FunWith::Testing::Assertions::FunWithFiles # alternately, just include tests piecemeal
|
|
8
|
+
class GemTestCase < FunWith::Testing::TestCase
|
|
9
|
+
install_basic_assertions
|
|
13
10
|
end
|
|
14
11
|
|
|
15
12
|
Then in test/test_gem.rb:
|
|
16
13
|
|
|
17
|
-
class
|
|
14
|
+
class MyUnitTest < GemTestCase
|
|
18
15
|
def test_my_thing
|
|
19
16
|
assert_zero( 0 )
|
|
20
17
|
assert_not_zero( 1 )
|
data/Rakefile
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require 'rubygems'
|
|
4
4
|
require 'bundler'
|
|
5
|
+
|
|
5
6
|
begin
|
|
6
7
|
Bundler.setup(:default, :development)
|
|
7
8
|
rescue Bundler::BundlerError => e
|
|
@@ -9,26 +10,37 @@ rescue Bundler::BundlerError => e
|
|
|
9
10
|
$stderr.puts "Run `bundle install` to install missing gems"
|
|
10
11
|
exit e.status_code
|
|
11
12
|
end
|
|
13
|
+
|
|
12
14
|
require 'rake'
|
|
15
|
+
require 'juwelier'
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
Jeweler::Tasks.new do |gem|
|
|
17
|
+
Gem::Specification.new do |gem|
|
|
16
18
|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
|
17
19
|
gem.name = "fun_with_testing"
|
|
20
|
+
|
|
21
|
+
gem.version = File.read('VERSION') if File.exist?('VERSION')
|
|
22
|
+
|
|
18
23
|
gem.homepage = "http://github.com/darthschmoo/fun_with_testing"
|
|
19
|
-
gem.
|
|
24
|
+
gem.licenses = ["MIT"]
|
|
20
25
|
gem.summary = "A place to stash Test::Unit assertions I've found handy."
|
|
21
|
-
gem.description = "A place to stash Test::Unit assertions I've found handy. Use at your own risk"
|
|
26
|
+
gem.description = "A place to stash Test::Unit assertions I've found handy. Use at your own risk."
|
|
22
27
|
gem.email = "keeputahweird@gmail.com"
|
|
23
28
|
gem.authors = ["Bryce Anderson"]
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
# Tried getting rid of this to see if it was blocking rake-install.
|
|
31
|
+
# No surch lurx.
|
|
32
|
+
gem.files = Dir.glob( File.join( ".", "lib", "**", "*.rb" ) ) +
|
|
26
33
|
Dir.glob( File.join( ".", "test", "**", "*" ) ) +
|
|
27
34
|
%w( Gemfile Rakefile LICENSE.txt README.rdoc VERSION CHANGELOG.markdown )
|
|
28
|
-
|
|
35
|
+
|
|
29
36
|
# dependencies defined in Gemfile
|
|
30
37
|
end
|
|
31
|
-
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
require 'bundler/gem_tasks'
|
|
43
|
+
Juwelier::RubygemsDotOrgTasks.new
|
|
32
44
|
|
|
33
45
|
require 'rake/testtask'
|
|
34
46
|
Rake::TestTask.new(:test) do |test|
|
|
@@ -45,14 +57,23 @@ end
|
|
|
45
57
|
# test.rcov_opts << '--exclude "gems/*"'
|
|
46
58
|
# end
|
|
47
59
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
60
|
+
# Adding this to see if it's making any difference
|
|
61
|
+
# desc "Code coverage detail"
|
|
62
|
+
# task :simplecov do
|
|
63
|
+
# ENV['COVERAGE'] = "true"
|
|
64
|
+
# Rake::Task['test'].execute
|
|
65
|
+
# end
|
|
66
|
+
#
|
|
53
67
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
68
|
+
task :default => :test
|
|
69
|
+
#
|
|
70
|
+
# require 'rdoc/task'
|
|
71
|
+
# Rake::RDocTask.new do |rdoc|
|
|
72
|
+
# version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
|
73
|
+
#
|
|
74
|
+
# rdoc.rdoc_dir = 'rdoc'
|
|
75
|
+
# rdoc.title = "fun_with_testing #{version}"
|
|
76
|
+
# rdoc.rdoc_files.include('README*')
|
|
77
|
+
# rdoc.rdoc_files.include('lib/**/*.rb')
|
|
78
|
+
# end
|
|
79
|
+
#
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.10
|