minitest-shouldify 1.1.1 → 2.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c7a7864b88f1854f9f035165ffb85e4993a57c2
4
- data.tar.gz: 7feb3f72936d2be495411c510b635d444a04f554
3
+ metadata.gz: 7f2192edc938cf4960e05fa94968880982def79c
4
+ data.tar.gz: ae60f389c3c19956466b726172dbddac2df0707d
5
5
  SHA512:
6
- metadata.gz: 7eda2fec3b60988e33fd5f7d445631ce753a62dd8b6e76bde9664c7b6369d4c54d2acc955f8198920ef705cedf0202adcddae7702531564e1069775e33cec03d
7
- data.tar.gz: f7f9e27915500fcbcf7e63c447962b1072dfd0830399f0870464febf68d138f2470f886ba2fe0c515b91d1cf32291870c0488ccf0c7dbedec63d3d1151092e2d
6
+ metadata.gz: 68913cd79da021d72a469ae57729ecd2b452a5149eec1de1f87667cc5e01d9a89410bd9ccf9376ae0f8d6dd6981a8ee8e0298508fedf4404d65274ccc934e248
7
+ data.tar.gz: 0ec0f984a15c961f60bfc6ae09e89481ab815b8dc5d82222daf9e9851a3f865fb6a7d6d359551f482c991739a2a43ed7cc16b315cdc43d4b40d3156dd95d2299
@@ -1,13 +1,17 @@
1
1
  ---
2
2
  before_install:
3
- - gem install hoe-travis minitest-matchers --no-rdoc --no-ri
4
- before_script:
5
- - rake travis:before -t
3
+ - gem update --system
4
+ - gem --version
5
+ script:
6
+ - bundle exec rake
6
7
  language: ruby
7
8
  notifications:
8
9
  email:
9
10
  - mike@blowmage.com
10
11
  rvm:
12
+ - 2.3.1
13
+ - 2.2.5
14
+ - 2.1.9
15
+ - 2.0.0-p648
11
16
  - 1.9.3
12
17
  - ruby-head
13
- script: rake travis
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
@@ -1,15 +1,17 @@
1
1
  .autotest
2
2
  .travis.yml
3
3
  CHANGELOG.rdoc
4
+ Gemfile
4
5
  Manifest.txt
5
6
  README.rdoc
6
7
  Rakefile
7
8
  lib/minitest-shouldify.rb
8
9
  lib/minitest/shouldify.rb
9
10
  minitest-shouldify.gemspec
10
- test/test_helper.rb
11
+ test/helper.rb
11
12
  test/test_must_not.rb
12
13
  test/test_sanity.rb
13
14
  test/test_shall.rb
14
15
  test/test_shouldify.rb
16
+ test/test_to.rb
15
17
  test/test_wimpy.rb
@@ -15,7 +15,7 @@ First, require minitest-shouldify in your <tt>test_helper.rb</tt> file:
15
15
 
16
16
  Second, register your desired expectation names:
17
17
 
18
- MiniTest::Shouldify.register! "should", "should_not"
18
+ Minitest::Shouldify.register! "should", "should_not"
19
19
 
20
20
  Now you are ready to use the new names:
21
21
 
@@ -85,7 +85,7 @@ just as <tt>assert</tt> and <tt>refute</tt> are.
85
85
 
86
86
  If you don't like it you can always change it:
87
87
 
88
- MiniTest::Shouldify.register! "must", "must_not"
88
+ Minitest::Shouldify.register! "must", "must_not"
89
89
 
90
90
  == Disclaimer
91
91
 
data/Rakefile CHANGED
@@ -6,21 +6,23 @@ require "hoe"
6
6
  Hoe.plugin :git
7
7
  Hoe.plugin :gemspec
8
8
  Hoe.plugin :travis
9
- Hoe.plugins.delete :rubyforge
10
9
 
11
10
  Hoe.spec 'minitest-shouldify' do
12
11
  developer "Mike Moore", "mike@blowmage.com"
13
12
 
14
13
  self.summary = "Its a bad idea"
15
- self.description = "Adding all manner of shoulds to MiniTest"
16
- self.urls = ["http://blowmage.com/minitest-rails-shoulda"]
14
+ self.description = "Adding all manner of shoulds to Minitest"
15
+ self.urls = ["http://blowmage.com/minitest-shouldify"]
17
16
 
18
17
  self.history_file = "CHANGELOG.rdoc"
19
18
  self.readme_file = "README.rdoc"
20
19
  self.testlib = :minitest
21
20
 
22
- dependency "minitest", "~> 4.0"
23
- dependency "minitest-matchers", "~> 1.2", :dev
21
+ dependency "minitest", "~> 5.8"
22
+ dependency "minitest-autotest", "~> 1.0", :dev
23
+ dependency "minitest-matchers", "~> 1.4", :dev
24
+ dependency "minitest-rg", "~> 5.2", :dev
25
+ dependency "rdoc", "~> 4.2", :dev
24
26
  end
25
27
 
26
28
  # vim: syntax=ruby
@@ -1,7 +1,7 @@
1
1
  require "minitest/shouldify"
2
2
 
3
- module MiniTest
3
+ module Minitest
4
4
  module Shouldify
5
- VERSION = "1.1.1"
5
+ VERSION = "2.0.0"
6
6
  end
7
7
  end
@@ -1,6 +1,6 @@
1
1
  require "minitest/spec"
2
2
 
3
- module MiniTest::Shouldify # :nodoc:
3
+ module Minitest::Shouldify # :nodoc:
4
4
  class << self
5
5
  attr_accessor :run_setup # :nodoc:
6
6
  attr_accessor :expectation_owners # :nodoc:
@@ -11,7 +11,7 @@ module MiniTest::Shouldify # :nodoc:
11
11
  #
12
12
  # Example:
13
13
  #
14
- # MiniTest::Shouldify.register! "should", "should_not"
14
+ # Minitest::Shouldify.register! "should", "should_not"
15
15
  #
16
16
  # describe Foo do
17
17
  # it "is bar" do
@@ -55,8 +55,8 @@ module MiniTest::Shouldify # :nodoc:
55
55
 
56
56
  def shouldify_matchers new_must, new_wont # :nodoc:
57
57
  # Only do this if Matchers exists
58
- if MiniTest.const_defined?("Matchers")
59
- unless MiniTest::Shouldify.const_defined?("Matcher_#{new_must}_#{new_wont}")
58
+ if Minitest::Test.respond_to? :register_matcher
59
+ unless Minitest::Shouldify.const_defined?("Matcher_#{new_must}_#{new_wont}")
60
60
  m = Module.new
61
61
  m.module_eval "
62
62
  def #{new_must}(*args, &block)
@@ -66,10 +66,10 @@ module MiniTest::Shouldify # :nodoc:
66
66
  wont(*args, &block)
67
67
  end
68
68
  "
69
- MiniTest::Shouldify.const_set("Matcher_#{new_must}_#{new_wont}", m)
69
+ Minitest::Shouldify.const_set("Matcher_#{new_must}_#{new_wont}", m)
70
70
 
71
- MiniTest::Spec.send :include, m
72
- MiniTest::Spec.extend m
71
+ Minitest::Spec.send :include, m
72
+ Minitest::Spec.extend m
73
73
  end
74
74
  end
75
75
  end
@@ -97,8 +97,8 @@ module MiniTest::Shouldify # :nodoc:
97
97
  end
98
98
  end
99
99
  # Prime the existing expectation owner
100
- # MiniTest adds all expectations to Object by default
101
- MiniTest::Shouldify.added_expectation! Object
100
+ # Minitest adds all expectations to Minitest::Expectation by default
101
+ Minitest::Shouldify.added_expectation! Minitest::Expectation
102
102
 
103
103
  # Add hook to infect_an_assertion
104
104
  class Module # :nodoc:
@@ -107,25 +107,23 @@ class Module # :nodoc:
107
107
  # Call the original method
108
108
  infect_an_assertion_shouldified meth, new_name, dont_flip
109
109
  # Register the class that has the expectation
110
- MiniTest::Shouldify.added_expectation! self
110
+ Minitest::Shouldify.added_expectation! self
111
111
  end
112
112
  end
113
113
 
114
- module MiniTest
114
+ module Minitest
115
115
  module Shouldify
116
116
  module Lifecycle # :nodoc:
117
117
  # Hook into Minitest's Lifecycle to alias methods when tests are run.
118
118
  def before_setup # :nodoc:
119
- MiniTest::Shouldify.shouldify!
119
+ Minitest::Shouldify.shouldify!
120
120
  super
121
121
  end
122
122
  end
123
123
  end
124
- class Unit # :nodoc:
125
- class TestCase # :nodoc:
126
- # Register the Lifecycle
127
- include MiniTest::Shouldify::Lifecycle
128
- end
124
+ class Test # :nodoc:
125
+ # Register the Lifecycle
126
+ include Minitest::Shouldify::Lifecycle
129
127
  end
130
128
 
131
129
  ##
@@ -133,7 +131,7 @@ module MiniTest
133
131
  #
134
132
  # Example:
135
133
  #
136
- # MiniTest.shouldify! "should", "should_not"
134
+ # Minitest.shouldify! "should", "should_not"
137
135
  #
138
136
  # class Foo
139
137
  # def bar; "bar"; end
@@ -149,6 +147,6 @@ module MiniTest
149
147
  # end
150
148
  # end
151
149
  def self.shouldify! new_must, new_wont
152
- MiniTest::Shouldify.register! new_must, new_wont
150
+ Minitest::Shouldify.register! new_must, new_wont
153
151
  end
154
152
  end
@@ -1,42 +1,48 @@
1
1
  # -*- encoding: utf-8 -*-
2
+ # stub: minitest-shouldify 2.0.0.20160805230022 ruby lib
2
3
 
3
4
  Gem::Specification.new do |s|
4
- s.name = "minitest-shouldify"
5
- s.version = "1.1.1.20130423161218"
5
+ s.name = "minitest-shouldify".freeze
6
+ s.version = "2.0.0.20160805230022"
6
7
 
7
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["Mike Moore"]
9
- s.date = "2013-04-23"
10
- s.description = "Adding all manner of shoulds to MiniTest"
11
- s.email = ["mike@blowmage.com"]
12
- s.extra_rdoc_files = ["CHANGELOG.rdoc", "Manifest.txt", "README.rdoc"]
13
- s.files = [".autotest", ".travis.yml", "CHANGELOG.rdoc", "Manifest.txt", "README.rdoc", "Rakefile", "lib/minitest-shouldify.rb", "lib/minitest/shouldify.rb", "minitest-shouldify.gemspec", "test/test_helper.rb", "test/test_must_not.rb", "test/test_sanity.rb", "test/test_shall.rb", "test/test_shouldify.rb", "test/test_wimpy.rb", ".gemtest"]
14
- s.homepage = "http://blowmage.com/minitest-rails-shoulda"
15
- s.rdoc_options = ["--main", "README.rdoc"]
16
- s.require_paths = ["lib"]
17
- s.rubyforge_project = "minitest-shouldify"
18
- s.rubygems_version = "2.0.3"
19
- s.summary = "Its a bad idea"
20
- s.test_files = ["test/test_helper.rb", "test/test_must_not.rb", "test/test_sanity.rb", "test/test_shall.rb", "test/test_shouldify.rb", "test/test_wimpy.rb"]
8
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
+ s.require_paths = ["lib".freeze]
10
+ s.authors = ["Mike Moore".freeze]
11
+ s.date = "2016-08-06"
12
+ s.description = "Adding all manner of shoulds to Minitest".freeze
13
+ s.email = ["mike@blowmage.com".freeze]
14
+ s.extra_rdoc_files = ["CHANGELOG.rdoc".freeze, "Manifest.txt".freeze, "README.rdoc".freeze]
15
+ s.files = [".autotest".freeze, ".travis.yml".freeze, "CHANGELOG.rdoc".freeze, "Gemfile".freeze, "Manifest.txt".freeze, "README.rdoc".freeze, "Rakefile".freeze, "lib/minitest-shouldify.rb".freeze, "lib/minitest/shouldify.rb".freeze, "minitest-shouldify.gemspec".freeze, "test/helper.rb".freeze, "test/test_must_not.rb".freeze, "test/test_sanity.rb".freeze, "test/test_shall.rb".freeze, "test/test_shouldify.rb".freeze, "test/test_to.rb".freeze, "test/test_wimpy.rb".freeze]
16
+ s.homepage = "http://blowmage.com/minitest-shouldify".freeze
17
+ s.licenses = ["MIT".freeze]
18
+ s.rdoc_options = ["--main".freeze, "README.rdoc".freeze]
19
+ s.rubygems_version = "2.6.4".freeze
20
+ s.summary = "Its a bad idea".freeze
21
21
 
22
22
  if s.respond_to? :specification_version then
23
23
  s.specification_version = 4
24
24
 
25
25
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
26
- s.add_runtime_dependency(%q<minitest>, ["~> 4.0"])
27
- s.add_development_dependency(%q<rdoc>, ["~> 4.0"])
28
- s.add_development_dependency(%q<minitest-matchers>, ["~> 1.2"])
29
- s.add_development_dependency(%q<hoe>, ["~> 3.6"])
26
+ s.add_runtime_dependency(%q<minitest>.freeze, ["~> 5.8"])
27
+ s.add_development_dependency(%q<rdoc>.freeze, ["~> 4.0"])
28
+ s.add_development_dependency(%q<minitest-autotest>.freeze, ["~> 1.0"])
29
+ s.add_development_dependency(%q<minitest-matchers>.freeze, ["~> 1.4"])
30
+ s.add_development_dependency(%q<minitest-rg>.freeze, ["~> 5.2"])
31
+ s.add_development_dependency(%q<hoe>.freeze, ["~> 3.15"])
30
32
  else
31
- s.add_dependency(%q<minitest>, ["~> 4.0"])
32
- s.add_dependency(%q<rdoc>, ["~> 4.0"])
33
- s.add_dependency(%q<minitest-matchers>, ["~> 1.2"])
34
- s.add_dependency(%q<hoe>, ["~> 3.6"])
33
+ s.add_dependency(%q<minitest>.freeze, ["~> 5.8"])
34
+ s.add_dependency(%q<rdoc>.freeze, ["~> 4.0"])
35
+ s.add_dependency(%q<minitest-autotest>.freeze, ["~> 1.0"])
36
+ s.add_dependency(%q<minitest-matchers>.freeze, ["~> 1.4"])
37
+ s.add_dependency(%q<minitest-rg>.freeze, ["~> 5.2"])
38
+ s.add_dependency(%q<hoe>.freeze, ["~> 3.15"])
35
39
  end
36
40
  else
37
- s.add_dependency(%q<minitest>, ["~> 4.0"])
38
- s.add_dependency(%q<rdoc>, ["~> 4.0"])
39
- s.add_dependency(%q<minitest-matchers>, ["~> 1.2"])
40
- s.add_dependency(%q<hoe>, ["~> 3.6"])
41
+ s.add_dependency(%q<minitest>.freeze, ["~> 5.8"])
42
+ s.add_dependency(%q<rdoc>.freeze, ["~> 4.0"])
43
+ s.add_dependency(%q<minitest-autotest>.freeze, ["~> 1.0"])
44
+ s.add_dependency(%q<minitest-matchers>.freeze, ["~> 1.4"])
45
+ s.add_dependency(%q<minitest-rg>.freeze, ["~> 5.2"])
46
+ s.add_dependency(%q<hoe>.freeze, ["~> 3.15"])
41
47
  end
42
48
  end
@@ -1,6 +1,7 @@
1
1
  require "minitest/autorun"
2
2
  require "minitest/matchers"
3
3
  require "minitest/shouldify"
4
+ require "minitest/rg"
4
5
 
5
6
  class Foo
6
7
  def bar
@@ -11,8 +12,7 @@ class Foo
11
12
  end
12
13
  end
13
14
 
14
-
15
- module MiniTest
15
+ module Minitest
16
16
  module Shouldify
17
17
  module Matchers
18
18
  class BeEqualTo
@@ -49,6 +49,6 @@ module MiniTest
49
49
  end
50
50
  end
51
51
 
52
- class MiniTest::Unit::TestCase
53
- include MiniTest::Shouldify::Matchers
52
+ class Minitest::Test
53
+ include Minitest::Shouldify::Matchers
54
54
  end
@@ -1,29 +1,26 @@
1
- require "test_helper"
1
+ require "helper"
2
2
 
3
- MiniTest::Shouldify.register! "must", "must_not"
3
+ Minitest::Shouldify.register! "must", "must_not"
4
4
 
5
5
  describe Foo do
6
-
7
- before do
8
- @foo = Foo.new
9
- end
6
+ let(:foo) { Foo.new }
10
7
 
11
8
  describe "asserts" do
12
9
  describe :bar do
13
10
  it "is bar" do
14
- assert_equal "bar", @foo.bar
11
+ assert_equal "bar", foo.bar
15
12
  end
16
13
  it "isn't baz" do
17
- refute_equal "baz", @foo.bar
14
+ refute_equal "baz", foo.bar
18
15
  end
19
16
  end
20
17
 
21
18
  describe :baz do
22
19
  it "is baz" do
23
- assert_equal "baz", @foo.baz
20
+ assert_equal "baz", foo.baz
24
21
  end
25
22
  it "isn't baz" do
26
- refute_equal "bar", @foo.baz
23
+ refute_equal "bar", foo.baz
27
24
  end
28
25
  end
29
26
  end
@@ -31,19 +28,21 @@ describe Foo do
31
28
  describe "default matcher" do
32
29
  describe :bar do
33
30
  it "is bar" do
34
- @foo.bar.must_equal "bar"
31
+ foo.bar.must_equal "bar"
35
32
  end
36
33
  it "isn't baz" do
37
- @foo.bar.wont_equal "baz"
34
+ foo.bar.wont_equal "baz"
38
35
  end
39
36
  end
40
37
 
41
38
  describe :baz do
42
39
  it "is baz" do
43
- @foo.baz.must_equal "baz"
40
+ foo.baz.must_equal "baz"
41
+ value(foo.baz).must_equal "baz"
44
42
  end
45
43
  it "isn't baz" do
46
- @foo.baz.wont_equal "bar"
44
+ foo.baz.wont_equal "bar"
45
+ value(foo.baz).wont_equal "bar"
47
46
  end
48
47
  end
49
48
  end
@@ -51,19 +50,23 @@ describe Foo do
51
50
  describe "new matcher" do
52
51
  describe :bar do
53
52
  it "is bar" do
54
- @foo.bar.must_equal "bar"
53
+ foo.bar.must_equal "bar"
54
+ value(foo.bar).must_equal "bar"
55
55
  end
56
56
  it "isn't baz" do
57
- @foo.bar.must_not_equal "baz"
57
+ foo.bar.must_not_equal "baz"
58
+ value(foo.bar).must_not_equal "baz"
58
59
  end
59
60
  end
60
61
 
61
62
  describe :baz do
62
63
  it "is baz" do
63
- @foo.baz.must_equal "baz"
64
+ foo.baz.must_equal "baz"
65
+ value(foo.baz).must_equal "baz"
64
66
  end
65
67
  it "isn't baz" do
66
- @foo.baz.must_not_equal "bar"
68
+ foo.baz.must_not_equal "bar"
69
+ value(foo.baz).must_not_equal "bar"
67
70
  end
68
71
  end
69
72
  end
@@ -71,24 +74,28 @@ describe Foo do
71
74
  describe "be_equal_to matcher" do
72
75
  describe :bar do
73
76
  it "is bar" do
74
- @foo.bar.must_be_equal_to "bar"
77
+ foo.bar.must_be_equal_to "bar"
78
+ value(foo.bar).must_be_equal_to "bar"
75
79
  end
76
80
  it "isn't baz" do
77
- @foo.bar.must_not_be_equal_to "baz"
81
+ foo.bar.must_not_be_equal_to "baz"
82
+ value(foo.bar).must_not_be_equal_to "baz"
78
83
  end
79
84
  end
80
85
 
81
86
  describe :baz do
82
87
  it "is baz" do
83
- @foo.baz.must_be_equal_to "baz"
88
+ foo.baz.must_be_equal_to "baz"
89
+ value(foo.baz).must_be_equal_to "baz"
84
90
  end
85
91
  it "isn't baz" do
86
- @foo.baz.must_not_be_equal_to "bar"
92
+ foo.baz.must_not_be_equal_to "bar"
93
+ value(foo.baz).must_not_be_equal_to "bar"
87
94
  end
88
95
  end
89
96
 
90
97
  describe "with subject" do
91
- subject { @foo.bar }
98
+ subject { foo.bar }
92
99
 
93
100
  it { must be_equal_to("bar") }
94
101
  it { must_not be_equal_to("baz") }
@@ -1,7 +1,7 @@
1
1
  require "minitest/autorun"
2
2
  require "minitest-shouldify"
3
3
 
4
- class TestSanity < MiniTest::Unit::TestCase
4
+ class TestSanity < Minitest::Test
5
5
  def test_sanity
6
6
  assert Minitest::Shouldify::VERSION
7
7
  end
@@ -1,29 +1,26 @@
1
- require "test_helper"
1
+ require "helper"
2
2
 
3
- MiniTest::Shouldify.register! "shall", "shant"
3
+ Minitest::Shouldify.register! "shall", "shant"
4
4
 
5
5
  describe Foo do
6
-
7
- before do
8
- @foo = Foo.new
9
- end
6
+ let(:foo) { Foo.new }
10
7
 
11
8
  describe "asserts" do
12
9
  describe :bar do
13
10
  it "is bar" do
14
- assert_equal "bar", @foo.bar
11
+ assert_equal "bar", foo.bar
15
12
  end
16
13
  it "isn't baz" do
17
- refute_equal "baz", @foo.bar
14
+ refute_equal "baz", foo.bar
18
15
  end
19
16
  end
20
17
 
21
18
  describe :baz do
22
19
  it "is baz" do
23
- assert_equal "baz", @foo.baz
20
+ assert_equal "baz", foo.baz
24
21
  end
25
22
  it "isn't baz" do
26
- refute_equal "bar", @foo.baz
23
+ refute_equal "bar", foo.baz
27
24
  end
28
25
  end
29
26
  end
@@ -31,19 +28,23 @@ describe Foo do
31
28
  describe "default matcher" do
32
29
  describe :bar do
33
30
  it "is bar" do
34
- @foo.bar.must_equal "bar"
31
+ foo.bar.must_equal "bar"
32
+ value(foo.bar).must_equal "bar"
35
33
  end
36
34
  it "isn't baz" do
37
- @foo.bar.wont_equal "baz"
35
+ foo.bar.wont_equal "baz"
36
+ value(foo.bar).wont_equal "baz"
38
37
  end
39
38
  end
40
39
 
41
40
  describe :baz do
42
41
  it "is baz" do
43
- @foo.baz.must_equal "baz"
42
+ foo.baz.must_equal "baz"
43
+ value(foo.baz).must_equal "baz"
44
44
  end
45
45
  it "isn't baz" do
46
- @foo.baz.wont_equal "bar"
46
+ foo.baz.wont_equal "bar"
47
+ value(foo.baz).wont_equal "bar"
47
48
  end
48
49
  end
49
50
  end
@@ -51,19 +52,23 @@ describe Foo do
51
52
  describe "new matcher" do
52
53
  describe :bar do
53
54
  it "is bar" do
54
- @foo.bar.shall_equal "bar"
55
+ foo.bar.shall_equal "bar"
56
+ value(foo.bar).shall_equal "bar"
55
57
  end
56
58
  it "isn't baz" do
57
- @foo.bar.shant_equal "baz"
59
+ foo.bar.shant_equal "baz"
60
+ value(foo.bar).shant_equal "baz"
58
61
  end
59
62
  end
60
63
 
61
64
  describe :baz do
62
65
  it "is baz" do
63
- @foo.baz.shall_equal "baz"
66
+ foo.baz.shall_equal "baz"
67
+ value(foo.baz).shall_equal "baz"
64
68
  end
65
69
  it "isn't baz" do
66
- @foo.baz.shant_equal "bar"
70
+ foo.baz.shant_equal "bar"
71
+ value(foo.baz).shant_equal "bar"
67
72
  end
68
73
  end
69
74
  end
@@ -71,24 +76,28 @@ describe Foo do
71
76
  describe "be_equal_to matcher" do
72
77
  describe :bar do
73
78
  it "is bar" do
74
- @foo.bar.shall_be_equal_to "bar"
79
+ foo.bar.shall_be_equal_to "bar"
80
+ value(foo.bar).shall_be_equal_to "bar"
75
81
  end
76
82
  it "isn't baz" do
77
- @foo.bar.shant_be_equal_to "baz"
83
+ foo.bar.shant_be_equal_to "baz"
84
+ value(foo.bar).shant_be_equal_to "baz"
78
85
  end
79
86
  end
80
87
 
81
88
  describe :baz do
82
89
  it "is baz" do
83
- @foo.baz.shall_be_equal_to "baz"
90
+ foo.baz.shall_be_equal_to "baz"
91
+ value(foo.baz).shall_be_equal_to "baz"
84
92
  end
85
93
  it "isn't baz" do
86
- @foo.baz.shant_be_equal_to "bar"
94
+ foo.baz.shant_be_equal_to "bar"
95
+ value(foo.baz).shant_be_equal_to "bar"
87
96
  end
88
97
  end
89
98
 
90
99
  describe "with subject" do
91
- subject { @foo.bar }
100
+ subject { foo.bar }
92
101
 
93
102
  it { shall be_equal_to("bar") }
94
103
  it { shant be_equal_to("baz") }
@@ -1,29 +1,26 @@
1
- require "test_helper"
1
+ require "helper"
2
2
 
3
- MiniTest::Shouldify.register! "should", "should_not"
3
+ Minitest::Shouldify.register! "should", "should_not"
4
4
 
5
5
  describe Foo do
6
-
7
- before do
8
- @foo = Foo.new
9
- end
6
+ let(:foo) { Foo.new }
10
7
 
11
8
  describe "asserts" do
12
9
  describe :bar do
13
10
  it "is bar" do
14
- assert_equal "bar", @foo.bar
11
+ assert_equal "bar", foo.bar
15
12
  end
16
13
  it "isn't baz" do
17
- refute_equal "baz", @foo.bar
14
+ refute_equal "baz", foo.bar
18
15
  end
19
16
  end
20
17
 
21
18
  describe :baz do
22
19
  it "is baz" do
23
- assert_equal "baz", @foo.baz
20
+ assert_equal "baz", foo.baz
24
21
  end
25
22
  it "isn't baz" do
26
- refute_equal "bar", @foo.baz
23
+ refute_equal "bar", foo.baz
27
24
  end
28
25
  end
29
26
  end
@@ -31,19 +28,23 @@ describe Foo do
31
28
  describe "default matcher" do
32
29
  describe :bar do
33
30
  it "is bar" do
34
- @foo.bar.must_equal "bar"
31
+ foo.bar.must_equal "bar"
32
+ value(foo.bar).must_equal "bar"
35
33
  end
36
34
  it "isn't baz" do
37
- @foo.bar.wont_equal "baz"
35
+ foo.bar.wont_equal "baz"
36
+ value(foo.bar).wont_equal "baz"
38
37
  end
39
38
  end
40
39
 
41
40
  describe :baz do
42
41
  it "is baz" do
43
- @foo.baz.must_equal "baz"
42
+ foo.baz.must_equal "baz"
43
+ value(foo.baz).must_equal "baz"
44
44
  end
45
45
  it "isn't baz" do
46
- @foo.baz.wont_equal "bar"
46
+ foo.baz.wont_equal "bar"
47
+ value(foo.baz).wont_equal "bar"
47
48
  end
48
49
  end
49
50
  end
@@ -51,19 +52,23 @@ describe Foo do
51
52
  describe "new matcher" do
52
53
  describe :bar do
53
54
  it "is bar" do
54
- @foo.bar.should_equal "bar"
55
+ foo.bar.should_equal "bar"
56
+ value(foo.bar).should_equal "bar"
55
57
  end
56
58
  it "isn't baz" do
57
- @foo.bar.should_not_equal "baz"
59
+ foo.bar.should_not_equal "baz"
60
+ value(foo.bar).should_not_equal "baz"
58
61
  end
59
62
  end
60
63
 
61
64
  describe :baz do
62
65
  it "is baz" do
63
- @foo.baz.should_equal "baz"
66
+ foo.baz.should_equal "baz"
67
+ value(foo.baz).should_equal "baz"
64
68
  end
65
69
  it "isn't baz" do
66
- @foo.baz.should_not_equal "bar"
70
+ foo.baz.should_not_equal "bar"
71
+ value(foo.baz).should_not_equal "bar"
67
72
  end
68
73
  end
69
74
  end
@@ -71,24 +76,28 @@ describe Foo do
71
76
  describe "be_equal_to matcher" do
72
77
  describe :bar do
73
78
  it "is bar" do
74
- @foo.bar.should_be_equal_to "bar"
79
+ foo.bar.should_be_equal_to "bar"
80
+ value(foo.bar).should_be_equal_to "bar"
75
81
  end
76
82
  it "isn't baz" do
77
- @foo.bar.should_not_be_equal_to "baz"
83
+ foo.bar.should_not_be_equal_to "baz"
84
+ value(foo.bar).should_not_be_equal_to "baz"
78
85
  end
79
86
  end
80
87
 
81
88
  describe :baz do
82
89
  it "is baz" do
83
- @foo.baz.should_be_equal_to "baz"
90
+ foo.baz.should_be_equal_to "baz"
91
+ value(foo.baz).should_be_equal_to "baz"
84
92
  end
85
93
  it "isn't baz" do
86
- @foo.baz.should_not_be_equal_to "bar"
94
+ foo.baz.should_not_be_equal_to "bar"
95
+ value(foo.baz).should_not_be_equal_to "bar"
87
96
  end
88
97
  end
89
98
 
90
99
  describe "with subject" do
91
- subject { @foo.bar }
100
+ subject { foo.bar }
92
101
 
93
102
  it { should be_equal_to("bar") }
94
103
  it { should_not be_equal_to("baz") }
@@ -0,0 +1,110 @@
1
+ require "helper"
2
+
3
+ Minitest::Shouldify.register! "to", "not_to"
4
+
5
+ describe Foo do
6
+ let(:foo) { Foo.new }
7
+
8
+ describe "asserts" do
9
+ describe :bar do
10
+ it "is bar" do
11
+ assert_equal "bar", foo.bar
12
+ end
13
+ it "isn't baz" do
14
+ refute_equal "baz", foo.bar
15
+ end
16
+ end
17
+
18
+ describe :baz do
19
+ it "is baz" do
20
+ assert_equal "baz", foo.baz
21
+ end
22
+ it "isn't baz" do
23
+ refute_equal "bar", foo.baz
24
+ end
25
+ end
26
+ end
27
+
28
+ describe "default matcher" do
29
+ describe :bar do
30
+ it "is bar" do
31
+ foo.bar.must_equal "bar"
32
+ value(foo.bar).must_equal "bar"
33
+ end
34
+ it "isn't baz" do
35
+ foo.bar.wont_equal "baz"
36
+ value(foo.bar).wont_equal "baz"
37
+ end
38
+ end
39
+
40
+ describe :baz do
41
+ it "is baz" do
42
+ foo.baz.must_equal "baz"
43
+ value(foo.baz).must_equal "baz"
44
+ end
45
+ it "isn't baz" do
46
+ foo.baz.wont_equal "bar"
47
+ value(foo.baz).wont_equal "bar"
48
+ end
49
+ end
50
+ end
51
+
52
+ describe "new matcher" do
53
+ describe :bar do
54
+ it "is bar" do
55
+ foo.bar.to_equal "bar"
56
+ value(foo.bar).to_equal "bar"
57
+ end
58
+ it "isn't baz" do
59
+ foo.bar.not_to_equal "baz"
60
+ value(foo.bar).not_to_equal "baz"
61
+ end
62
+ end
63
+
64
+ describe :baz do
65
+ it "is baz" do
66
+ foo.baz.to_equal "baz"
67
+ value(foo.baz).to_equal "baz"
68
+ end
69
+ it "isn't baz" do
70
+ foo.baz.not_to_equal "bar"
71
+ value(foo.baz).not_to_equal "bar"
72
+ end
73
+ end
74
+ end
75
+
76
+ describe "be_equal_to matcher" do
77
+ describe :bar do
78
+ it "is bar" do
79
+ foo.bar.to_be_equal_to "bar"
80
+ value(foo.bar).to_be_equal_to "bar"
81
+ end
82
+ it "isn't baz" do
83
+ foo.bar.not_to_be_equal_to "baz"
84
+ value(foo.bar).not_to_be_equal_to "baz"
85
+ end
86
+ end
87
+
88
+ describe :baz do
89
+ it "is baz" do
90
+ foo.baz.to_be_equal_to "baz"
91
+ value(foo.baz).to_be_equal_to "baz"
92
+ end
93
+ it "isn't baz" do
94
+ foo.baz.not_to_be_equal_to "bar"
95
+ value(foo.baz).not_to_be_equal_to "bar"
96
+ end
97
+ end
98
+
99
+ describe "with subject" do
100
+ subject { foo.bar }
101
+
102
+ it { to be_equal_to("bar") }
103
+ it { not_to be_equal_to("baz") }
104
+
105
+ to { be_equal_to("bar") }
106
+ not_to { be_equal_to("baz") }
107
+ end
108
+ end
109
+
110
+ end
@@ -1,29 +1,26 @@
1
- require "test_helper"
1
+ require "helper"
2
2
 
3
- MiniTest::Shouldify.register! "would_you_please", "rather_you_wouldnt"
3
+ Minitest::Shouldify.register! "would_you_please", "rather_you_wouldnt"
4
4
 
5
5
  describe Foo do
6
-
7
- before do
8
- @foo = Foo.new
9
- end
6
+ let(:foo) { Foo.new }
10
7
 
11
8
  describe "asserts" do
12
9
  describe :bar do
13
10
  it "is bar" do
14
- assert_equal "bar", @foo.bar
11
+ assert_equal "bar", foo.bar
15
12
  end
16
13
  it "isn't baz" do
17
- refute_equal "baz", @foo.bar
14
+ refute_equal "baz", foo.bar
18
15
  end
19
16
  end
20
17
 
21
18
  describe :baz do
22
19
  it "is baz" do
23
- assert_equal "baz", @foo.baz
20
+ assert_equal "baz", foo.baz
24
21
  end
25
22
  it "isn't baz" do
26
- refute_equal "bar", @foo.baz
23
+ refute_equal "bar", foo.baz
27
24
  end
28
25
  end
29
26
  end
@@ -31,19 +28,23 @@ describe Foo do
31
28
  describe "default matcher" do
32
29
  describe :bar do
33
30
  it "is bar" do
34
- @foo.bar.must_equal "bar"
31
+ foo.bar.must_equal "bar"
32
+ value(foo.bar).must_equal "bar"
35
33
  end
36
34
  it "isn't baz" do
37
- @foo.bar.wont_equal "baz"
35
+ foo.bar.wont_equal "baz"
36
+ value(foo.bar).wont_equal "baz"
38
37
  end
39
38
  end
40
39
 
41
40
  describe :baz do
42
41
  it "is baz" do
43
- @foo.baz.must_equal "baz"
42
+ foo.baz.must_equal "baz"
43
+ value(foo.baz).must_equal "baz"
44
44
  end
45
45
  it "isn't baz" do
46
- @foo.baz.wont_equal "bar"
46
+ foo.baz.wont_equal "bar"
47
+ value(foo.baz).wont_equal "bar"
47
48
  end
48
49
  end
49
50
  end
@@ -51,19 +52,23 @@ describe Foo do
51
52
  describe "new matcher" do
52
53
  describe :bar do
53
54
  it "is bar" do
54
- @foo.bar.would_you_please_equal "bar"
55
+ foo.bar.would_you_please_equal "bar"
56
+ value(foo.bar).would_you_please_equal "bar"
55
57
  end
56
58
  it "isn't baz" do
57
- @foo.bar.rather_you_wouldnt_equal "baz"
59
+ foo.bar.rather_you_wouldnt_equal "baz"
60
+ value(foo.bar).rather_you_wouldnt_equal "baz"
58
61
  end
59
62
  end
60
63
 
61
64
  describe :baz do
62
65
  it "is baz" do
63
- @foo.baz.would_you_please_equal "baz"
66
+ foo.baz.would_you_please_equal "baz"
67
+ value(foo.baz).would_you_please_equal "baz"
64
68
  end
65
69
  it "isn't baz" do
66
- @foo.baz.rather_you_wouldnt_equal "bar"
70
+ foo.baz.rather_you_wouldnt_equal "bar"
71
+ value(foo.baz).rather_you_wouldnt_equal "bar"
67
72
  end
68
73
  end
69
74
  end
@@ -71,24 +76,28 @@ describe Foo do
71
76
  describe "be_equal_to matcher" do
72
77
  describe :bar do
73
78
  it "is bar" do
74
- @foo.bar.would_you_please_be_equal_to "bar"
79
+ foo.bar.would_you_please_be_equal_to "bar"
80
+ value(foo.bar).would_you_please_be_equal_to "bar"
75
81
  end
76
82
  it "isn't baz" do
77
- @foo.bar.rather_you_wouldnt_be_equal_to "baz"
83
+ foo.bar.rather_you_wouldnt_be_equal_to "baz"
84
+ value(foo.bar).rather_you_wouldnt_be_equal_to "baz"
78
85
  end
79
86
  end
80
87
 
81
88
  describe :baz do
82
89
  it "is baz" do
83
- @foo.baz.would_you_please_be_equal_to "baz"
90
+ foo.baz.would_you_please_be_equal_to "baz"
91
+ value(foo.baz).would_you_please_be_equal_to "baz"
84
92
  end
85
93
  it "isn't baz" do
86
- @foo.baz.rather_you_wouldnt_be_equal_to "bar"
94
+ foo.baz.rather_you_wouldnt_be_equal_to "bar"
95
+ value(foo.baz).rather_you_wouldnt_be_equal_to "bar"
87
96
  end
88
97
  end
89
98
 
90
99
  describe "with subject" do
91
- subject { @foo.bar }
100
+ subject { foo.bar }
92
101
 
93
102
  it { would_you_please be_equal_to("bar") }
94
103
  it { rather_you_wouldnt be_equal_to("baz") }
metadata CHANGED
@@ -1,72 +1,100 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-shouldify
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-23 00:00:00.000000000 Z
11
+ date: 2016-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
19
+ version: '5.8'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.0'
26
+ version: '5.8'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rdoc
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '4.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '4.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest-autotest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: minitest-matchers
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - ~>
59
+ - - "~>"
46
60
  - !ruby/object:Gem::Version
47
- version: '1.2'
61
+ version: '1.4'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - ~>
66
+ - - "~>"
53
67
  - !ruby/object:Gem::Version
54
- version: '1.2'
68
+ version: '1.4'
69
+ - !ruby/object:Gem::Dependency
70
+ name: minitest-rg
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '5.2'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '5.2'
55
83
  - !ruby/object:Gem::Dependency
56
84
  name: hoe
57
85
  requirement: !ruby/object:Gem::Requirement
58
86
  requirements:
59
- - - ~>
87
+ - - "~>"
60
88
  - !ruby/object:Gem::Version
61
- version: '3.6'
89
+ version: '3.15'
62
90
  type: :development
63
91
  prerelease: false
64
92
  version_requirements: !ruby/object:Gem::Requirement
65
93
  requirements:
66
- - - ~>
94
+ - - "~>"
67
95
  - !ruby/object:Gem::Version
68
- version: '3.6'
69
- description: Adding all manner of shoulds to MiniTest
96
+ version: '3.15'
97
+ description: Adding all manner of shoulds to Minitest
70
98
  email:
71
99
  - mike@blowmage.com
72
100
  executables: []
@@ -76,51 +104,47 @@ extra_rdoc_files:
76
104
  - Manifest.txt
77
105
  - README.rdoc
78
106
  files:
79
- - .autotest
80
- - .travis.yml
107
+ - ".autotest"
108
+ - ".travis.yml"
81
109
  - CHANGELOG.rdoc
110
+ - Gemfile
82
111
  - Manifest.txt
83
112
  - README.rdoc
84
113
  - Rakefile
85
114
  - lib/minitest-shouldify.rb
86
115
  - lib/minitest/shouldify.rb
87
116
  - minitest-shouldify.gemspec
88
- - test/test_helper.rb
117
+ - test/helper.rb
89
118
  - test/test_must_not.rb
90
119
  - test/test_sanity.rb
91
120
  - test/test_shall.rb
92
121
  - test/test_shouldify.rb
122
+ - test/test_to.rb
93
123
  - test/test_wimpy.rb
94
- - .gemtest
95
- homepage: http://blowmage.com/minitest-rails-shoulda
96
- licenses: []
124
+ homepage: http://blowmage.com/minitest-shouldify
125
+ licenses:
126
+ - MIT
97
127
  metadata: {}
98
128
  post_install_message:
99
129
  rdoc_options:
100
- - --main
130
+ - "--main"
101
131
  - README.rdoc
102
132
  require_paths:
103
133
  - lib
104
134
  required_ruby_version: !ruby/object:Gem::Requirement
105
135
  requirements:
106
- - - '>='
136
+ - - ">="
107
137
  - !ruby/object:Gem::Version
108
138
  version: '0'
109
139
  required_rubygems_version: !ruby/object:Gem::Requirement
110
140
  requirements:
111
- - - '>='
141
+ - - ">="
112
142
  - !ruby/object:Gem::Version
113
143
  version: '0'
114
144
  requirements: []
115
- rubyforge_project: minitest-shouldify
116
- rubygems_version: 2.0.3
145
+ rubyforge_project:
146
+ rubygems_version: 2.6.4
117
147
  signing_key:
118
148
  specification_version: 4
119
149
  summary: Its a bad idea
120
- test_files:
121
- - test/test_helper.rb
122
- - test/test_must_not.rb
123
- - test/test_sanity.rb
124
- - test/test_shall.rb
125
- - test/test_shouldify.rb
126
- - test/test_wimpy.rb
150
+ test_files: []
data/.gemtest DELETED
File without changes