assert_same 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -95,6 +95,9 @@ In Ruby 1.9:
95
95
 
96
96
  Changelog
97
97
  ---------
98
+ - 0.7: Support Ruby 1.9's MiniTest
99
+ - 0.6: Support test execution on Mac
100
+ - 0.5: Support code blocks to assert_same
98
101
  - 0.4: Added support for code blocks as argument
99
102
  - 0.3: Ruby 1.9 is supported
100
103
  - 0.2: Make assert_same useful as a standalone gem. Bugfixes
data/assert_same.gemspec CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  SPEC = Gem::Specification.new do |s|
4
4
  s.name = "assert_same"
5
- s.version = "0.6.1"
5
+ s.version = "0.7.0"
6
6
  s.author = "Pluron, Inc."
7
7
  s.email = "support@pluron.com"
8
8
  s.homepage = "http://github.com/acunote/assert_same"
data/lib/assert_same.rb CHANGED
@@ -58,7 +58,13 @@ unless defined? internal_error
58
58
  end
59
59
 
60
60
 
61
- module Test::Unit::Assertions
61
+ test_unit_module = if RUBY_VERSION >= "1.9.0"
62
+ Object.const_get('MiniTest').const_get('Assertions')
63
+ else
64
+ Object.const_get('Test').const_get('Unit').const_get('Assertions')
65
+ end
66
+
67
+ test_unit_module.module_eval do
62
68
 
63
69
  #Hash[filename][line_number] = offset
64
70
  #For each line in the original file we store its offset (+N or -N lines)
@@ -85,3 +85,14 @@ class AssertSameTest < Test::Unit::TestCase
85
85
  end
86
86
 
87
87
  end
88
+
89
+
90
+ class AssertSameMiniTest < MiniTest::Unit::TestCase
91
+
92
+ def test_basic_assert_same
93
+ assert_same "foo", <<-END
94
+ foo
95
+ END
96
+ end
97
+
98
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assert_same
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-06 00:00:00.000000000 Z
12
+ date: 2013-10-01 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: assert_same assertion
15
15
  email: support@pluron.com
@@ -60,4 +60,3 @@ test_files:
60
60
  - test/assert_same_test.rb
61
61
  - test/logs/assert_same_exception_with_files.log.ref
62
62
  - test/logs/assert_same_with_files.log.ref
63
- has_rdoc: true