shoulda-change_matchers 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shoulda/change_matchers.rb +2 -1
- metadata +60 -16
- data/.travis.yml +0 -4
- data/Appraisals +0 -7
- data/Gemfile +0 -8
- data/Gemfile.lock +0 -36
- data/Rakefile +0 -12
- data/Readme.md +0 -43
- data/gemfiles/shoulda2.gemfile +0 -10
- data/gemfiles/shoulda2.gemfile.lock +0 -24
- data/gemfiles/shoulda3.gemfile +0 -10
- data/gemfiles/shoulda3.gemfile.lock +0 -34
- data/shoulda-change_matchers.gemspec +0 -10
- data/test/shoulda_change_matchers_test.rb +0 -44
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0417e72a57d9c695c877331703a5f4e9e9e7e8de
|
4
|
+
data.tar.gz: 2ca6415edc8e00358071b1154eecb90f14faa140
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de78a4794806817d2dc9a6270edf641d7a35070681dbfb968c9d4913abd58bce47cd1816334e91257fb6b2ada0957550bcf31dce92f2eccb4215ff2ed21acde3
|
7
|
+
data.tar.gz: 2c642fa14acb67b95679dae01a3b8dc5b4eede5dba540507e611e31bbb23cdd499abd3903507bc28dcb66edc208b96cf71eedfc9eafb7f3d461176362e699011
|
metadata
CHANGED
@@ -1,35 +1,79 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shoulda-change_matchers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
11
|
+
date: 2015-04-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
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: bump
|
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
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: wwtd
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: shoulda
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
13
69
|
description:
|
14
70
|
email: michael@grosser.it
|
15
71
|
executables: []
|
16
72
|
extensions: []
|
17
73
|
extra_rdoc_files: []
|
18
74
|
files:
|
19
|
-
- ".travis.yml"
|
20
|
-
- Appraisals
|
21
|
-
- Gemfile
|
22
|
-
- Gemfile.lock
|
23
|
-
- Rakefile
|
24
|
-
- Readme.md
|
25
|
-
- gemfiles/shoulda2.gemfile
|
26
|
-
- gemfiles/shoulda2.gemfile.lock
|
27
|
-
- gemfiles/shoulda3.gemfile
|
28
|
-
- gemfiles/shoulda3.gemfile.lock
|
29
75
|
- lib/shoulda/change_matchers.rb
|
30
|
-
|
31
|
-
- test/shoulda_change_matchers_test.rb
|
32
|
-
homepage: http://github.com/grosser/shoulda-change_matchers
|
76
|
+
homepage: https://github.com/grosser/shoulda-change_matchers
|
33
77
|
licenses:
|
34
78
|
- MIT
|
35
79
|
metadata: {}
|
data/.travis.yml
DELETED
data/Appraisals
DELETED
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
shoulda-change_matchers (0.0.2)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
activesupport (3.2.8)
|
10
|
-
i18n (~> 0.6)
|
11
|
-
multi_json (~> 1.0)
|
12
|
-
appraisal (0.4.1)
|
13
|
-
bundler
|
14
|
-
rake
|
15
|
-
bump (0.5.0)
|
16
|
-
i18n (0.6.0)
|
17
|
-
multi_json (1.3.6)
|
18
|
-
rake (0.9.2)
|
19
|
-
shoulda (3.1.1)
|
20
|
-
shoulda-context (~> 1.0)
|
21
|
-
shoulda-matchers (~> 1.2)
|
22
|
-
shoulda-context (1.0.0)
|
23
|
-
shoulda-matchers (1.2.0)
|
24
|
-
activesupport (>= 3.0.0)
|
25
|
-
test-unit (2.5.2)
|
26
|
-
|
27
|
-
PLATFORMS
|
28
|
-
ruby
|
29
|
-
|
30
|
-
DEPENDENCIES
|
31
|
-
appraisal
|
32
|
-
bump
|
33
|
-
rake
|
34
|
-
shoulda
|
35
|
-
shoulda-change_matchers!
|
36
|
-
test-unit (>= 2.5.1)
|
data/Rakefile
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
require 'bundler/setup'
|
2
|
-
require 'appraisal'
|
3
|
-
require 'bundler/gem_tasks'
|
4
|
-
require 'bump/tasks'
|
5
|
-
|
6
|
-
task :test do
|
7
|
-
sh "ruby test/shoulda_change_matchers_test.rb"
|
8
|
-
end
|
9
|
-
|
10
|
-
task :default do
|
11
|
-
sh "bundle exec rake appraisal:install && bundle exec rake appraisal test"
|
12
|
-
end
|
data/Readme.md
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
should_change / should_create / should_destroy matchers for shoulda 3 backported from shoulda 2<br/>
|
2
|
-
so you can upgrade to shoulda 3 without rewriting major parts of your test-base.
|
3
|
-
|
4
|
-
gem install shoulda-change_matchers
|
5
|
-
|
6
|
-
# Gemfile
|
7
|
-
gem "shoulda-change_matchers", :require => "shoulda/change_matchers"
|
8
|
-
|
9
|
-
Usage
|
10
|
-
=====
|
11
|
-
|
12
|
-
<!-- example -->
|
13
|
-
context "creating" do
|
14
|
-
setup do
|
15
|
-
User.create!
|
16
|
-
User.create!
|
17
|
-
end
|
18
|
-
|
19
|
-
should_change("the number of users", :by => 2) { User.count }
|
20
|
-
end
|
21
|
-
|
22
|
-
context "doing nothing" do
|
23
|
-
should_not_change("the number of users") { User.count }
|
24
|
-
end
|
25
|
-
|
26
|
-
context "creating" do
|
27
|
-
setup{ User.create! }
|
28
|
-
should_create :user
|
29
|
-
end
|
30
|
-
|
31
|
-
context "destroying" do
|
32
|
-
setup{ User.delete_all }
|
33
|
-
should_destroy :user
|
34
|
-
end
|
35
|
-
<!-- example -->
|
36
|
-
|
37
|
-
|
38
|
-
Author
|
39
|
-
======
|
40
|
-
[Michael Grosser](http://grosser.it)<br/>
|
41
|
-
michael@grosser.it<br/>
|
42
|
-
License: MIT<br/>
|
43
|
-
[![Build Status](https://secure.travis-ci.org/grosser/shoulda_change_matchers.png)](http://travis-ci.org/grosser/shoulda_change_matchers)
|
data/gemfiles/shoulda2.gemfile
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../
|
3
|
-
specs:
|
4
|
-
shoulda-change_matchers (0.0.1)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
appraisal (0.4.1)
|
10
|
-
bundler
|
11
|
-
rake
|
12
|
-
rake (0.9.2.2)
|
13
|
-
shoulda (2.11.3)
|
14
|
-
test-unit (2.5.2)
|
15
|
-
|
16
|
-
PLATFORMS
|
17
|
-
ruby
|
18
|
-
|
19
|
-
DEPENDENCIES
|
20
|
-
appraisal
|
21
|
-
rake
|
22
|
-
shoulda (~> 2.11)
|
23
|
-
shoulda-change_matchers!
|
24
|
-
test-unit (>= 2.5.1)
|
data/gemfiles/shoulda3.gemfile
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../
|
3
|
-
specs:
|
4
|
-
shoulda-change_matchers (0.0.1)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
activesupport (3.2.8)
|
10
|
-
i18n (~> 0.6)
|
11
|
-
multi_json (~> 1.0)
|
12
|
-
appraisal (0.4.1)
|
13
|
-
bundler
|
14
|
-
rake
|
15
|
-
i18n (0.6.0)
|
16
|
-
multi_json (1.3.6)
|
17
|
-
rake (0.9.2.2)
|
18
|
-
shoulda (3.1.1)
|
19
|
-
shoulda-context (~> 1.0)
|
20
|
-
shoulda-matchers (~> 1.2)
|
21
|
-
shoulda-context (1.0.0)
|
22
|
-
shoulda-matchers (1.3.0)
|
23
|
-
activesupport (>= 3.0.0)
|
24
|
-
test-unit (2.5.2)
|
25
|
-
|
26
|
-
PLATFORMS
|
27
|
-
ruby
|
28
|
-
|
29
|
-
DEPENDENCIES
|
30
|
-
appraisal
|
31
|
-
rake
|
32
|
-
shoulda (~> 3.1)
|
33
|
-
shoulda-change_matchers!
|
34
|
-
test-unit (>= 2.5.1)
|
@@ -1,10 +0,0 @@
|
|
1
|
-
name = "shoulda-change_matchers"
|
2
|
-
|
3
|
-
Gem::Specification.new name, "0.0.2" do |s|
|
4
|
-
s.summary = "should_change / should_create / should_destroy matchers for shoulda 3 backported from shoulda 2"
|
5
|
-
s.authors = ["Michael Grosser"]
|
6
|
-
s.email = "michael@grosser.it"
|
7
|
-
s.homepage = "http://github.com/grosser/#{name}"
|
8
|
-
s.files = `git ls-files`.split("\n")
|
9
|
-
s.license = "MIT"
|
10
|
-
end
|
@@ -1,44 +0,0 @@
|
|
1
|
-
require "test/unit"
|
2
|
-
require "shoulda"
|
3
|
-
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
|
4
|
-
require "shoulda/change_matchers"
|
5
|
-
|
6
|
-
# simulate active_support being here ...
|
7
|
-
class String
|
8
|
-
def camelize
|
9
|
-
"User"
|
10
|
-
end
|
11
|
-
|
12
|
-
def constantize
|
13
|
-
eval self
|
14
|
-
end
|
15
|
-
|
16
|
-
def humanize
|
17
|
-
camelize
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
class User
|
22
|
-
class << self
|
23
|
-
attr_accessor :count
|
24
|
-
|
25
|
-
def create!
|
26
|
-
self.count += 1
|
27
|
-
end
|
28
|
-
|
29
|
-
def delete_all
|
30
|
-
self.count = 0
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
class ShouldaLetTest < Test::Unit::TestCase
|
36
|
-
setup do
|
37
|
-
User.count = 1
|
38
|
-
end
|
39
|
-
|
40
|
-
context "Readme" do
|
41
|
-
example = File.read(File.expand_path("../../Readme.md", __FILE__)).match(/<!-- example -->(.*)<!-- example -->/m)[1]
|
42
|
-
eval example
|
43
|
-
end
|
44
|
-
end
|