its-minitest 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4a670c26e82161371968983a480ed410db2fcfe2
4
+ data.tar.gz: 32b3bd63627d49d36142b8592f24ac1fad838d1e
5
+ SHA512:
6
+ metadata.gz: a712e3753e53eeb36fe81009cd1ed70b785cdd3aeef5a80daab1b484d11eba4d4fa2bdd116c2624218c00d46a40216658cfcfdcabe42a30959d5c4750d75f781
7
+ data.tar.gz: 05ebfae8c41940811ce1ae1373ce5675e93c11d5d486ca0907e62bfe9ae4f6cac7767e3b91a0eb0558f791b8d5ea2dff54f188c06a9f7e3a983416eabe8f4e5f
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in its-minitest.gemspec
4
+ gemspec
5
+
6
+ group :development, :test do
7
+ gem 'guard'
8
+ gem 'guard-minitest'
9
+ gem 'guard-bundler'
10
+ gem 'rb-fsevent'
11
+ gem 'terminal-notifier-guard'
12
+ gem 'growl'
13
+ gem 'github-markup'
14
+ end
@@ -0,0 +1,16 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+ notification :terminal_notifier
4
+
5
+ guard 'bundler' do
6
+ watch('Gemfile')
7
+ # Uncomment next line if Gemfile contain `gemspec' command
8
+ # watch(/^.+\.gemspec/)
9
+ end
10
+
11
+ guard 'minitest' do
12
+ # with Minitest::Spec
13
+ watch(%r|^spec/(.*)_spec\.rb|)
14
+ watch(%r|^lib/(.*)([^/]+)\.rb|) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
15
+ watch(%r|^spec/spec_helper\.rb|) { "spec" }
16
+ end
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Mark Madsen
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,45 @@
1
+ # Its Minitest
2
+
3
+ I miss ```its``` in minitest so here's a hack to get it back in.
4
+
5
+ Right now it doesn't support the array syntax for its.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ gem 'its-minitest'
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install its-minitest
20
+
21
+ ## Usage
22
+
23
+ ```ruby
24
+ describe 'its minitest syntax' do
25
+ subject{ 1337 }
26
+
27
+ its(:to_int){ must_equal 1337 }
28
+ its(:to_int){ must_be :> , 1336 }
29
+ its(:to_int){ must_be :< , 1338 }
30
+ its(:to_s){ must_equal "1337" }
31
+ its(:even?){ must_equal false }
32
+ its(:to_s){ wont_be_empty }
33
+ its(:to_s){ wont_equal "1338" }
34
+ its(:to_s){ must_be_instance_of String }
35
+ its(:to_s){ wont_be_instance_of 1337.class }
36
+ end
37
+ ```
38
+
39
+ ## Contributing
40
+
41
+ 1. Fork it
42
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
43
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
44
+ 4. Push to the branch (`git push origin my-new-feature`)
45
+ 5. Create new Pull Request
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'its-minitest/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "its-minitest"
8
+ gem.version = ItsMinitest::VERSION
9
+ gem.authors = ["Mark Madsen"]
10
+ gem.email = ["mark@agileanimal.com"]
11
+ gem.description = %q{Adds support for its syntax to minitest.}
12
+ gem.summary = %q{Adds support for its syntax to minitest.}
13
+ gem.homepage = ""
14
+ gem.license = "MIT"
15
+
16
+ gem.files = `git ls-files`.split($/)
17
+ gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
+ gem.require_paths = ["lib"]
20
+
21
+ gem.add_dependency "minitest"
22
+ gem.add_development_dependency "rake"
23
+ end
Binary file
@@ -0,0 +1,15 @@
1
+ require "minitest/spec"
2
+ require "its-minitest/version"
3
+
4
+ # HACK! Adds its to minitest - extract this into a gem once we're happy with it.
5
+ class MiniTest::Spec
6
+ def self.its attribute, &block
7
+ describe "verify subject.#{attribute} for" do
8
+ let(:inner_subject) { subject.send(attribute) }
9
+
10
+ it "verify subject.#{attribute} for" do
11
+ inner_subject.instance_eval &block
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,3 @@
1
+ module ItsMinitest
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,23 @@
1
+ require 'spec_helper'
2
+
3
+ describe ItsMinitest do
4
+
5
+ it 'should have a version number' do
6
+ ItsMinitest::VERSION.wont_be_nil
7
+ end
8
+
9
+ describe 'its minitest syntax' do
10
+ subject{ 1337 }
11
+
12
+ its(:to_int){ must_equal 1337 }
13
+ its(:to_int){ must_be :> , 1336 }
14
+ its(:to_int){ must_be :< , 1338 }
15
+ its(:to_s){ must_equal "1337" }
16
+ its(:even?){ must_equal false }
17
+ its(:to_s){ wont_be_empty }
18
+ its(:to_s){ wont_equal "1338" }
19
+ its(:to_s){ must_be_instance_of String }
20
+ its(:to_s){ wont_be_instance_of 1337.class }
21
+
22
+ end
23
+ end
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
+ require 'its-minitest'
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: its-minitest
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Mark Madsen
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-02-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: minitest
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: Adds support for its syntax to minitest.
42
+ email:
43
+ - mark@agileanimal.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - .gitignore
49
+ - Gemfile
50
+ - Guardfile
51
+ - LICENSE.txt
52
+ - README.md
53
+ - Rakefile
54
+ - its-minitest.gemspec
55
+ - lib/.DS_Store
56
+ - lib/its-minitest.rb
57
+ - lib/its-minitest/.DS_Store
58
+ - lib/its-minitest/version.rb
59
+ - spec/its-minitest_spec.rb
60
+ - spec/spec_helper.rb
61
+ homepage: ''
62
+ licenses:
63
+ - MIT
64
+ metadata: {}
65
+ post_install_message:
66
+ rdoc_options: []
67
+ require_paths:
68
+ - lib
69
+ required_ruby_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - '>='
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ required_rubygems_version: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ requirements: []
80
+ rubyforge_project:
81
+ rubygems_version: 2.0.0.rc.2
82
+ signing_key:
83
+ specification_version: 4
84
+ summary: Adds support for its syntax to minitest.
85
+ test_files:
86
+ - spec/its-minitest_spec.rb
87
+ - spec/spec_helper.rb