minitest-spec-expect 0.1.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0506523fe0fda5d2761cad8fc13b9170f8fcc280
4
- data.tar.gz: 32312015cdedf8a8c762c6ada818bae0e015914f
3
+ metadata.gz: e507e3c0ddd656f732eee9925c3fe75cfce15bb3
4
+ data.tar.gz: 21dd1295a526d328ba43878f0afbab89252b4b31
5
5
  SHA512:
6
- metadata.gz: fa05b677c8e4575ce61a4dce51247b3d80f8141a622672d05cf84e75e9948697564c9c6b9879eda66c9eb7074433c128a0d8e5653ded107251650fe7f4e45db0
7
- data.tar.gz: 5fa64d45f1c8deedfd1892b87ea3a5e564a8deeee1078c7a9f6ca81d4c84d1f4e8ba186cff45e6415156cd92ea814a55a1900d705af274e619315f5b23e1eb6c
6
+ metadata.gz: d1ae50e570ffb411f6233c08e8bfab8fbce17d8de3adb29e6c3abf06cc92b73ba18cee48bf75eb984484714c3471e5816b632ab4e7e71031d6a589074e698dd4
7
+ data.tar.gz: 2c041cb1f29119438aba2d4f3535b021e505d91cd559eb4def7e4ade37d9dcff942f82f4f04726fb08212819248384a9240bad4254f2eec418830b2ad226e387
@@ -3,6 +3,6 @@ rvm:
3
3
  - 1.9.2
4
4
  - 1.9.3
5
5
  - 2.0.0
6
- - rbx-19mode
6
+ - 2.1.0
7
7
  - jruby-19mode
8
8
  script: bundle exec rake
@@ -1,3 +1,6 @@
1
+ #### version 1.0.0 - *December 28, 2013*
2
+ * Simplified initializer for expect object. Make stable.
3
+
1
4
  #### version 0.1.0 - *May 23, 2013*
2
5
  * Added ability to pass a block to `#expect`. When a block is passed to it, the expect object responds
3
6
  to `#to_throw`, `#to_raise`, `#to_output`, and `#to_be_silent`. Big thanks to
data/README.md CHANGED
@@ -21,8 +21,8 @@ minitest-spec-expect works in the following ruby versions and implementations:
21
21
  * 1.9.2
22
22
  * 1.9.3
23
23
  * 2.0.0
24
+ * 2.1.0
24
25
  * JRuby
25
- * Rubinius
26
26
 
27
27
  ## Usage
28
28
  Wrap the object under test in an `expect()` object. Then call a Minitest expectation on it,
@@ -2,13 +2,13 @@ module Kernel
2
2
  NO_ARG = Object.new
3
3
 
4
4
  def expect arg=NO_ARG, &block
5
- raise_errors arg, block
5
+ _raise_minitest_spec_expect_errors arg, block
6
6
  Minitest::Spec::Expect.create arg, &block
7
7
  end
8
8
 
9
9
  private
10
10
 
11
- def raise_errors object, block
11
+ def _raise_minitest_spec_expect_errors object, block
12
12
  if object == NO_ARG
13
13
  raise ArgumentError, 'must pass an argument or a block' if !block
14
14
  else
@@ -20,15 +20,13 @@ end
20
20
  require 'minitest/autorun'
21
21
 
22
22
  class Minitest::Spec::Expect
23
- OBJECT_UNDER_TEST = 'object'
23
+ OBJECT_UNDER_TEST = :object_under_test
24
24
 
25
25
  attr_reader OBJECT_UNDER_TEST
26
26
 
27
- class_eval <<-CODE
28
- def initialize #{OBJECT_UNDER_TEST}
29
- @#{OBJECT_UNDER_TEST} = #{OBJECT_UNDER_TEST}
30
- end
31
- CODE
27
+ def initialize object_under_test
28
+ @object_under_test = object_under_test
29
+ end
32
30
 
33
31
  def self.create arg, &block
34
32
  block ? ForBlock.new(block) : ForArg.new(arg)
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
9
9
  s.authors = ['Dave Jachimiak']
10
10
  s.email = 'dave.jachimiak@gmail.com'
11
11
  s.homepage = 'http://github.com/davejachimiak/minitest-spec-expect'
12
- s.version = '0.1.3'
12
+ s.version = '1.0.0'
13
13
  s.files = `git ls-files`.split("\n").reject do |file_name|
14
14
  /\.gem$/.match file_name
15
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-spec-expect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Jachimiak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-10 00:00:00.000000000 Z
11
+ date: 2013-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -76,10 +76,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  version: '0'
77
77
  requirements: []
78
78
  rubyforge_project:
79
- rubygems_version: 2.0.2
79
+ rubygems_version: 2.0.6
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: Use the expect syntax with transposed minitest expectations.
83
83
  test_files:
84
84
  - spec/integration_spec.rb
85
85
  - spec/kernel_spec.rb
86
+ has_rdoc: