bogus 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -4
- data/Gemfile +2 -0
- data/Gemfile.lock +17 -13
- data/bogus.gemspec +2 -0
- data/features/changelog.md +6 -0
- data/features/contract_tests/contract_tests_mocks.feature +1 -1
- data/features/fakes/replacing_classes.feature +4 -4
- data/features/minitest/minitest_support.feature +119 -0
- data/features/step_definitions/rspec_steps.rb +14 -3
- data/lib/bogus.rb +6 -3
- data/lib/bogus/copies_classes.rb +5 -0
- data/lib/bogus/minitest.rb +46 -0
- data/lib/bogus/minitest/spec.rb +18 -0
- data/lib/bogus/rspec.rb +6 -1
- data/lib/bogus/version.rb +1 -1
- data/spec/bogus/copies_classes_spec.rb +9 -0
- metadata +117 -118
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bogus (0.1.
|
4
|
+
bogus (0.1.3)
|
5
5
|
dependor (>= 0.0.4)
|
6
6
|
|
7
7
|
GEM
|
@@ -27,7 +27,7 @@ GEM
|
|
27
27
|
cucumber (>= 1.1.1)
|
28
28
|
ffi (>= 1.0.11)
|
29
29
|
rspec (>= 2.7.0)
|
30
|
-
builder (3.0.
|
30
|
+
builder (3.0.4)
|
31
31
|
childprocess (0.3.2)
|
32
32
|
ffi (~> 1.0.6)
|
33
33
|
colorize (0.5.8)
|
@@ -37,19 +37,20 @@ GEM
|
|
37
37
|
rest-client
|
38
38
|
simplecov (>= 0.7)
|
39
39
|
thor
|
40
|
-
cucumber (1.
|
40
|
+
cucumber (1.3.3)
|
41
41
|
builder (>= 2.1.2)
|
42
42
|
diff-lcs (>= 1.1.3)
|
43
|
-
gherkin (~> 2.
|
44
|
-
|
45
|
-
|
43
|
+
gherkin (~> 2.12.0)
|
44
|
+
multi_json (~> 1.7.5)
|
45
|
+
multi_test (~> 0.0.1)
|
46
|
+
dependor (0.0.5)
|
46
47
|
diff-lcs (1.2.4)
|
47
48
|
ffi (1.0.11)
|
48
49
|
ffi (1.0.11-java)
|
49
|
-
gherkin (2.
|
50
|
-
|
51
|
-
gherkin (2.
|
52
|
-
|
50
|
+
gherkin (2.12.0)
|
51
|
+
multi_json (~> 1.3)
|
52
|
+
gherkin (2.12.0-java)
|
53
|
+
multi_json (~> 1.3)
|
53
54
|
growl (1.0.3)
|
54
55
|
guard (1.1.1)
|
55
56
|
listen (>= 0.4.2)
|
@@ -62,8 +63,8 @@ GEM
|
|
62
63
|
guard-rspec (1.1.0)
|
63
64
|
guard (>= 1.1)
|
64
65
|
i18n (0.6.1)
|
65
|
-
json (1.
|
66
|
-
json (1.
|
66
|
+
json (1.8.0)
|
67
|
+
json (1.8.0-java)
|
67
68
|
libnotify (0.7.4)
|
68
69
|
ffi (~> 1.0.11)
|
69
70
|
listen (0.4.5)
|
@@ -71,7 +72,9 @@ GEM
|
|
71
72
|
rb-fsevent (~> 0.9.1)
|
72
73
|
rb-inotify (~> 0.8.8)
|
73
74
|
mime-types (1.19)
|
74
|
-
|
75
|
+
minitest (5.0.6)
|
76
|
+
multi_json (1.7.7)
|
77
|
+
multi_test (0.0.1)
|
75
78
|
rake (0.9.2.2)
|
76
79
|
rb-fchange (0.0.5)
|
77
80
|
ffi
|
@@ -117,6 +120,7 @@ DEPENDENCIES
|
|
117
120
|
guard-cucumber
|
118
121
|
guard-rspec
|
119
122
|
libnotify
|
123
|
+
minitest
|
120
124
|
rake
|
121
125
|
relish
|
122
126
|
rr
|
data/bogus.gemspec
CHANGED
data/features/changelog.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Feature: Contract tests with mocks
|
2
2
|
|
3
|
-
Whenever you mock something, you specify a contract on the arguments/return value pair. Bogus can check automatically
|
3
|
+
Whenever you mock something, you specify a contract on the arguments/return value pair. Bogus can check automatically whether this contract was satisfied.
|
4
4
|
|
5
5
|
Background:
|
6
6
|
Given a file named "library.rb" with:
|
@@ -83,7 +83,7 @@ Feature: Replacing classes with fakes
|
|
83
83
|
"""
|
84
84
|
|
85
85
|
When I run `rspec book_index_spec.rb library_spec.rb`
|
86
|
-
Then
|
86
|
+
Then the specs should pass
|
87
87
|
|
88
88
|
Scenario: Replacing classes and contracts with a different fake name
|
89
89
|
Given a file named "library_spec.rb" with:
|
@@ -128,8 +128,8 @@ Feature: Replacing classes with fakes
|
|
128
128
|
"""
|
129
129
|
|
130
130
|
When I run `rspec book_index_spec.rb library_spec.rb`
|
131
|
-
Then
|
132
|
-
|
131
|
+
Then the specs should pass
|
132
|
+
|
133
133
|
Scenario: Replacing classes with a macro
|
134
134
|
Given a file named "book_index_spec.rb" with:
|
135
135
|
"""ruby
|
@@ -145,4 +145,4 @@ Feature: Replacing classes with fakes
|
|
145
145
|
"""
|
146
146
|
|
147
147
|
When I run `rspec book_index_spec.rb`
|
148
|
-
Then
|
148
|
+
Then the specs should pass
|
@@ -0,0 +1,119 @@
|
|
1
|
+
Feature: minitest support
|
2
|
+
|
3
|
+
minitest is supported by Bogus both with the classic assert-style syntax and the minitest/spec expectation syntax.
|
4
|
+
|
5
|
+
Background:
|
6
|
+
Given a file named "foo.rb" with:
|
7
|
+
"""ruby
|
8
|
+
class Library
|
9
|
+
def self.books
|
10
|
+
end
|
11
|
+
|
12
|
+
def checkout(book)
|
13
|
+
end
|
14
|
+
|
15
|
+
def return_book(book)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
class BookIndex
|
20
|
+
def self.by_author(author)
|
21
|
+
Library.books.select{|book| book[:author] == author}
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
class Student
|
26
|
+
def initialize(library)
|
27
|
+
@library = library
|
28
|
+
end
|
29
|
+
|
30
|
+
def study(*book_titles)
|
31
|
+
book_titles.each do |book_title|
|
32
|
+
@library.checkout(book_title)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
"""
|
37
|
+
|
38
|
+
Scenario: Auto-verification of unsatisfied mocks
|
39
|
+
Then minitest file "foo_test.rb" with the following content should fail:
|
40
|
+
"""ruby
|
41
|
+
require 'minitest/autorun'
|
42
|
+
require 'bogus/minitest'
|
43
|
+
require_relative 'foo'
|
44
|
+
|
45
|
+
class StudentTest < MiniTest::Unit::TestCase
|
46
|
+
def test_library_checkouts
|
47
|
+
library = fake(:library)
|
48
|
+
student = Student.new(library)
|
49
|
+
mock(library).checkout("Moby Dick")
|
50
|
+
mock(library).checkout("Sherlock Holmes")
|
51
|
+
|
52
|
+
student.study("Moby Dick")
|
53
|
+
end
|
54
|
+
end
|
55
|
+
"""
|
56
|
+
|
57
|
+
Scenario: Spying on method calls with assert syntax
|
58
|
+
Then minitest file "foo_test.rb" with the following content should pass:
|
59
|
+
"""ruby
|
60
|
+
require 'minitest/autorun'
|
61
|
+
require 'bogus/minitest'
|
62
|
+
require_relative 'foo'
|
63
|
+
|
64
|
+
class StudentTest < MiniTest::Unit::TestCase
|
65
|
+
def setup
|
66
|
+
@library = fake(:library)
|
67
|
+
end
|
68
|
+
|
69
|
+
def test_library_checkouts
|
70
|
+
student = Student.new(@library)
|
71
|
+
|
72
|
+
student.study("Moby Dick", "Sherlock Holmes")
|
73
|
+
|
74
|
+
assert_received @library, :checkout, ["Moby Dick"]
|
75
|
+
assert_received @library, :checkout, ["Sherlock Holmes"]
|
76
|
+
refute_received @library, :return_book, ["Moby Dick"]
|
77
|
+
end
|
78
|
+
end
|
79
|
+
"""
|
80
|
+
|
81
|
+
Scenario: Spying on method calls with expectation syntax
|
82
|
+
Then minitest file "foo_spec.rb" with the following content should pass:
|
83
|
+
"""ruby
|
84
|
+
require 'minitest/autorun'
|
85
|
+
require 'bogus/minitest/spec'
|
86
|
+
require_relative 'foo'
|
87
|
+
|
88
|
+
describe Student do
|
89
|
+
describe "#study" do
|
90
|
+
fake(:library)
|
91
|
+
|
92
|
+
it "studies using books from library" do
|
93
|
+
student = Student.new(library)
|
94
|
+
|
95
|
+
student.study("Moby Dick", "Sherlock Holmes")
|
96
|
+
|
97
|
+
library.must_have_received :checkout, ["Moby Dick"]
|
98
|
+
library.must_have_received :checkout, ["Sherlock Holmes"]
|
99
|
+
library.wont_have_received :return_book, ["Moby Dick"]
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
"""
|
104
|
+
|
105
|
+
Scenario: Describe-level class faking
|
106
|
+
Then minitest file "foo_spec.rb" with the following content should pass:
|
107
|
+
"""ruby
|
108
|
+
require 'minitest/autorun'
|
109
|
+
require 'bogus/minitest/spec'
|
110
|
+
require_relative 'foo'
|
111
|
+
|
112
|
+
describe BookIndex do
|
113
|
+
fake_class(Library, books: [])
|
114
|
+
|
115
|
+
it "returns books written by author" do
|
116
|
+
BookIndex.by_author("Mark Twain").must_equal []
|
117
|
+
end
|
118
|
+
end
|
119
|
+
"""
|
@@ -18,7 +18,7 @@ Then /^the specs should fail$/ do
|
|
18
18
|
}
|
19
19
|
end
|
20
20
|
|
21
|
-
Then /^
|
21
|
+
Then /^the specs should pass$/ do
|
22
22
|
steps %Q{
|
23
23
|
Then the exit status should be 0
|
24
24
|
}
|
@@ -45,7 +45,7 @@ Then /^spec file with following content should pass:$/ do |string|
|
|
45
45
|
"""ruby
|
46
46
|
#{string}
|
47
47
|
"""
|
48
|
-
Then
|
48
|
+
Then the specs should pass
|
49
49
|
}
|
50
50
|
end
|
51
51
|
|
@@ -69,6 +69,17 @@ Then /^the following test should pass:$/ do |string|
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
"""
|
72
|
-
Then
|
72
|
+
Then the specs should pass
|
73
|
+
}
|
74
|
+
end
|
75
|
+
|
76
|
+
Then /^minitest file "([^"]*)" with the following content should (pass|fail):$/ do |file_name, pass_fail, string|
|
77
|
+
steps %Q{
|
78
|
+
Given a file named "#{file_name}" with:
|
79
|
+
"""ruby
|
80
|
+
#{string}
|
81
|
+
"""
|
82
|
+
When I run `ruby #{file_name}`
|
83
|
+
Then the specs should #{pass_fail}
|
73
84
|
}
|
74
85
|
end
|
data/lib/bogus.rb
CHANGED
@@ -8,9 +8,12 @@ require_relative 'bogus/proxies_method_calls'
|
|
8
8
|
require_relative 'bogus/rspec_extensions'
|
9
9
|
require_relative 'bogus/rspec_adapter'
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
dir = File.realpath File.expand_path('../bogus', __FILE__)
|
12
|
+
Dir["#{dir}/**/*.rb"].sort.each do |path|
|
13
|
+
next if path.include? 'bogus/minitest'
|
14
|
+
next if path.include? 'bogus/rspec'
|
15
|
+
require path
|
16
|
+
end
|
14
17
|
|
15
18
|
module Bogus
|
16
19
|
extend PublicMethods
|
data/lib/bogus/copies_classes.rb
CHANGED
@@ -0,0 +1,46 @@
|
|
1
|
+
gem 'minitest', '>= 4.7'
|
2
|
+
require 'bogus'
|
3
|
+
|
4
|
+
module MiniTest::Assertions
|
5
|
+
def assert_received(subject, method, args, message = nil)
|
6
|
+
with_bogus_matcher_for(subject, method, args) do |matcher, result|
|
7
|
+
assert(result, message || matcher.failure_message_for_should)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def refute_received(subject, method, args, message = nil)
|
12
|
+
with_bogus_matcher_for(subject, method, args) do |matcher, result|
|
13
|
+
refute(result, message || matcher.failure_message_for_should_not)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def with_bogus_matcher_for(subject, method, args)
|
20
|
+
matcher = Bogus.have_received.__send__(method, *args)
|
21
|
+
result = matcher.matches?(subject)
|
22
|
+
yield matcher, result
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
module Bogus::Minitest
|
27
|
+
include Bogus::MockingDSL
|
28
|
+
|
29
|
+
def before_setup
|
30
|
+
super
|
31
|
+
Bogus.clear
|
32
|
+
end
|
33
|
+
|
34
|
+
def after_teardown
|
35
|
+
Bogus.ensure_all_expectations_satisfied!
|
36
|
+
super
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
class Minitest::Test
|
41
|
+
include Bogus::Minitest
|
42
|
+
end if defined? Minitest::Test
|
43
|
+
|
44
|
+
class MiniTest::Unit::TestCase
|
45
|
+
include Bogus::Minitest
|
46
|
+
end if defined? MiniTest::Unit::TestCase
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'bogus/minitest'
|
2
|
+
|
3
|
+
module MiniTest::Expectations
|
4
|
+
infect_an_assertion :assert_received, :must_have_received, true
|
5
|
+
infect_an_assertion :refute_received, :wont_have_received, true
|
6
|
+
end
|
7
|
+
|
8
|
+
class MiniTest::Spec
|
9
|
+
module DSL
|
10
|
+
def fake(name, opts = {}, &block)
|
11
|
+
let(name) { fake(name, opts, &block) }
|
12
|
+
end
|
13
|
+
|
14
|
+
def fake_class(name, opts = {})
|
15
|
+
before { fake_class(name, opts) }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/bogus/rspec.rb
CHANGED
@@ -5,7 +5,12 @@ RSpec.configure do |config|
|
|
5
5
|
config.include Bogus::MockingDSL
|
6
6
|
|
7
7
|
config.mock_with Bogus::RSpecAdapter
|
8
|
-
|
8
|
+
|
9
|
+
if RSpec::Core::Version::STRING >= "2.14"
|
10
|
+
config.backtrace_exclusion_patterns << Regexp.new("lib/bogus")
|
11
|
+
else
|
12
|
+
config.backtrace_clean_patterns << Regexp.new("lib/bogus")
|
13
|
+
end
|
9
14
|
|
10
15
|
config.after(:suite) do
|
11
16
|
Bogus.reset!
|
data/lib/bogus/version.rb
CHANGED
@@ -58,9 +58,18 @@ describe Bogus::CopiesClasses do
|
|
58
58
|
let(:fake) { fake_class.new }
|
59
59
|
|
60
60
|
class FooWithInstanceMethods
|
61
|
+
CONST = "the const"
|
61
62
|
include SampleMethods
|
62
63
|
end
|
63
64
|
|
65
|
+
context "nested constants" do
|
66
|
+
let(:klass) { FooWithInstanceMethods }
|
67
|
+
|
68
|
+
it "does not overwrite nested constants" do
|
69
|
+
fake_class::CONST.should == "the const"
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
64
73
|
context "instance methods" do
|
65
74
|
let(:klass) { FooWithInstanceMethods }
|
66
75
|
subject{ fake }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bogus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dependor
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70286171254600 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,15 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.0.4
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ! '>='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 0.0.4
|
24
|
+
version_requirements: *70286171254600
|
30
25
|
- !ruby/object:Gem::Dependency
|
31
26
|
name: rake
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
27
|
+
requirement: &70286171253600 !ruby/object:Gem::Requirement
|
33
28
|
none: false
|
34
29
|
requirements:
|
35
30
|
- - ! '>='
|
@@ -37,15 +32,10 @@ dependencies:
|
|
37
32
|
version: '0'
|
38
33
|
type: :development
|
39
34
|
prerelease: false
|
40
|
-
version_requirements:
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ! '>='
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '0'
|
35
|
+
version_requirements: *70286171253600
|
46
36
|
- !ruby/object:Gem::Dependency
|
47
37
|
name: rspec
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirement: &70286171252600 !ruby/object:Gem::Requirement
|
49
39
|
none: false
|
50
40
|
requirements:
|
51
41
|
- - ! '>='
|
@@ -53,15 +43,10 @@ dependencies:
|
|
53
43
|
version: '0'
|
54
44
|
type: :development
|
55
45
|
prerelease: false
|
56
|
-
version_requirements:
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ! '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
46
|
+
version_requirements: *70286171252600
|
62
47
|
- !ruby/object:Gem::Dependency
|
63
48
|
name: cucumber
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
+
requirement: &70286171267460 !ruby/object:Gem::Requirement
|
65
50
|
none: false
|
66
51
|
requirements:
|
67
52
|
- - ! '>='
|
@@ -69,15 +54,10 @@ dependencies:
|
|
69
54
|
version: '0'
|
70
55
|
type: :development
|
71
56
|
prerelease: false
|
72
|
-
version_requirements:
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ! '>='
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '0'
|
57
|
+
version_requirements: *70286171267460
|
78
58
|
- !ruby/object:Gem::Dependency
|
79
59
|
name: aruba
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirement: &70286171266740 !ruby/object:Gem::Requirement
|
81
61
|
none: false
|
82
62
|
requirements:
|
83
63
|
- - ! '>='
|
@@ -85,15 +65,10 @@ dependencies:
|
|
85
65
|
version: '0'
|
86
66
|
type: :development
|
87
67
|
prerelease: false
|
88
|
-
version_requirements:
|
89
|
-
none: false
|
90
|
-
requirements:
|
91
|
-
- - ! '>='
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: '0'
|
68
|
+
version_requirements: *70286171266740
|
94
69
|
- !ruby/object:Gem::Dependency
|
95
70
|
name: guard
|
96
|
-
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirement: &70286171265980 !ruby/object:Gem::Requirement
|
97
72
|
none: false
|
98
73
|
requirements:
|
99
74
|
- - ! '>='
|
@@ -101,15 +76,10 @@ dependencies:
|
|
101
76
|
version: '0'
|
102
77
|
type: :development
|
103
78
|
prerelease: false
|
104
|
-
version_requirements:
|
105
|
-
none: false
|
106
|
-
requirements:
|
107
|
-
- - ! '>='
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '0'
|
79
|
+
version_requirements: *70286171265980
|
110
80
|
- !ruby/object:Gem::Dependency
|
111
81
|
name: guard-rspec
|
112
|
-
requirement: !ruby/object:Gem::Requirement
|
82
|
+
requirement: &70286171265200 !ruby/object:Gem::Requirement
|
113
83
|
none: false
|
114
84
|
requirements:
|
115
85
|
- - ! '>='
|
@@ -117,15 +87,10 @@ dependencies:
|
|
117
87
|
version: '0'
|
118
88
|
type: :development
|
119
89
|
prerelease: false
|
120
|
-
version_requirements:
|
121
|
-
none: false
|
122
|
-
requirements:
|
123
|
-
- - ! '>='
|
124
|
-
- !ruby/object:Gem::Version
|
125
|
-
version: '0'
|
90
|
+
version_requirements: *70286171265200
|
126
91
|
- !ruby/object:Gem::Dependency
|
127
92
|
name: guard-cucumber
|
128
|
-
requirement: !ruby/object:Gem::Requirement
|
93
|
+
requirement: &70286171264400 !ruby/object:Gem::Requirement
|
129
94
|
none: false
|
130
95
|
requirements:
|
131
96
|
- - ! '>='
|
@@ -133,15 +98,10 @@ dependencies:
|
|
133
98
|
version: '0'
|
134
99
|
type: :development
|
135
100
|
prerelease: false
|
136
|
-
version_requirements:
|
137
|
-
none: false
|
138
|
-
requirements:
|
139
|
-
- - ! '>='
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
version: '0'
|
101
|
+
version_requirements: *70286171264400
|
142
102
|
- !ruby/object:Gem::Dependency
|
143
103
|
name: guard-ctags-bundler
|
144
|
-
requirement: !ruby/object:Gem::Requirement
|
104
|
+
requirement: &70286171263940 !ruby/object:Gem::Requirement
|
145
105
|
none: false
|
146
106
|
requirements:
|
147
107
|
- - ! '>='
|
@@ -149,15 +109,10 @@ dependencies:
|
|
149
109
|
version: '0'
|
150
110
|
type: :development
|
151
111
|
prerelease: false
|
152
|
-
version_requirements:
|
153
|
-
none: false
|
154
|
-
requirements:
|
155
|
-
- - ! '>='
|
156
|
-
- !ruby/object:Gem::Version
|
157
|
-
version: '0'
|
112
|
+
version_requirements: *70286171263940
|
158
113
|
- !ruby/object:Gem::Dependency
|
159
114
|
name: growl
|
160
|
-
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirement: &70286171263480 !ruby/object:Gem::Requirement
|
161
116
|
none: false
|
162
117
|
requirements:
|
163
118
|
- - ! '>='
|
@@ -165,15 +120,10 @@ dependencies:
|
|
165
120
|
version: '0'
|
166
121
|
type: :development
|
167
122
|
prerelease: false
|
168
|
-
version_requirements:
|
169
|
-
none: false
|
170
|
-
requirements:
|
171
|
-
- - ! '>='
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '0'
|
123
|
+
version_requirements: *70286171263480
|
174
124
|
- !ruby/object:Gem::Dependency
|
175
125
|
name: libnotify
|
176
|
-
requirement: !ruby/object:Gem::Requirement
|
126
|
+
requirement: &70286171262780 !ruby/object:Gem::Requirement
|
177
127
|
none: false
|
178
128
|
requirements:
|
179
129
|
- - ! '>='
|
@@ -181,15 +131,10 @@ dependencies:
|
|
181
131
|
version: '0'
|
182
132
|
type: :development
|
183
133
|
prerelease: false
|
184
|
-
version_requirements:
|
185
|
-
none: false
|
186
|
-
requirements:
|
187
|
-
- - ! '>='
|
188
|
-
- !ruby/object:Gem::Version
|
189
|
-
version: '0'
|
134
|
+
version_requirements: *70286171262780
|
190
135
|
- !ruby/object:Gem::Dependency
|
191
136
|
name: rr
|
192
|
-
requirement: !ruby/object:Gem::Requirement
|
137
|
+
requirement: &70286171262040 !ruby/object:Gem::Requirement
|
193
138
|
none: false
|
194
139
|
requirements:
|
195
140
|
- - ! '>='
|
@@ -197,15 +142,10 @@ dependencies:
|
|
197
142
|
version: '0'
|
198
143
|
type: :development
|
199
144
|
prerelease: false
|
200
|
-
version_requirements:
|
201
|
-
none: false
|
202
|
-
requirements:
|
203
|
-
- - ! '>='
|
204
|
-
- !ruby/object:Gem::Version
|
205
|
-
version: '0'
|
145
|
+
version_requirements: *70286171262040
|
206
146
|
- !ruby/object:Gem::Dependency
|
207
147
|
name: relish
|
208
|
-
requirement: !ruby/object:Gem::Requirement
|
148
|
+
requirement: &70286171261440 !ruby/object:Gem::Requirement
|
209
149
|
none: false
|
210
150
|
requirements:
|
211
151
|
- - ! '>='
|
@@ -213,15 +153,10 @@ dependencies:
|
|
213
153
|
version: '0'
|
214
154
|
type: :development
|
215
155
|
prerelease: false
|
216
|
-
version_requirements:
|
217
|
-
none: false
|
218
|
-
requirements:
|
219
|
-
- - ! '>='
|
220
|
-
- !ruby/object:Gem::Version
|
221
|
-
version: '0'
|
156
|
+
version_requirements: *70286171261440
|
222
157
|
- !ruby/object:Gem::Dependency
|
223
158
|
name: coveralls
|
224
|
-
requirement: !ruby/object:Gem::Requirement
|
159
|
+
requirement: &70286171261020 !ruby/object:Gem::Requirement
|
225
160
|
none: false
|
226
161
|
requirements:
|
227
162
|
- - ! '>='
|
@@ -229,15 +164,10 @@ dependencies:
|
|
229
164
|
version: '0'
|
230
165
|
type: :development
|
231
166
|
prerelease: false
|
232
|
-
version_requirements:
|
233
|
-
none: false
|
234
|
-
requirements:
|
235
|
-
- - ! '>='
|
236
|
-
- !ruby/object:Gem::Version
|
237
|
-
version: '0'
|
167
|
+
version_requirements: *70286171261020
|
238
168
|
- !ruby/object:Gem::Dependency
|
239
169
|
name: activerecord
|
240
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirement: &70286171260500 !ruby/object:Gem::Requirement
|
241
171
|
none: false
|
242
172
|
requirements:
|
243
173
|
- - ! '>='
|
@@ -245,15 +175,10 @@ dependencies:
|
|
245
175
|
version: '0'
|
246
176
|
type: :development
|
247
177
|
prerelease: false
|
248
|
-
version_requirements:
|
249
|
-
none: false
|
250
|
-
requirements:
|
251
|
-
- - ! '>='
|
252
|
-
- !ruby/object:Gem::Version
|
253
|
-
version: '0'
|
178
|
+
version_requirements: *70286171260500
|
254
179
|
- !ruby/object:Gem::Dependency
|
255
180
|
name: activerecord-nulldb-adapter
|
256
|
-
requirement: !ruby/object:Gem::Requirement
|
181
|
+
requirement: &70286171259860 !ruby/object:Gem::Requirement
|
257
182
|
none: false
|
258
183
|
requirements:
|
259
184
|
- - ! '>='
|
@@ -261,12 +186,18 @@ dependencies:
|
|
261
186
|
version: '0'
|
262
187
|
type: :development
|
263
188
|
prerelease: false
|
264
|
-
version_requirements:
|
189
|
+
version_requirements: *70286171259860
|
190
|
+
- !ruby/object:Gem::Dependency
|
191
|
+
name: minitest
|
192
|
+
requirement: &70286171275160 !ruby/object:Gem::Requirement
|
265
193
|
none: false
|
266
194
|
requirements:
|
267
195
|
- - ! '>='
|
268
196
|
- !ruby/object:Gem::Version
|
269
|
-
version: '
|
197
|
+
version: '4.7'
|
198
|
+
type: :development
|
199
|
+
prerelease: false
|
200
|
+
version_requirements: *70286171275160
|
270
201
|
description: Decreases the need to write integration tests by ensuring that the things
|
271
202
|
you stub or mock actually exist.
|
272
203
|
email:
|
@@ -304,6 +235,7 @@ files:
|
|
304
235
|
- features/fakes/replacing_classes.feature
|
305
236
|
- features/getting_started.md
|
306
237
|
- features/license.md
|
238
|
+
- features/minitest/minitest_support.feature
|
307
239
|
- features/readme.md
|
308
240
|
- features/safe_stubbing/argument_matchers.feature
|
309
241
|
- features/safe_stubbing/readme.md
|
@@ -344,6 +276,8 @@ files:
|
|
344
276
|
- lib/bogus/makes_substitute_methods.rb
|
345
277
|
- lib/bogus/makes_subtypes.rb
|
346
278
|
- lib/bogus/method_stringifier.rb
|
279
|
+
- lib/bogus/minitest.rb
|
280
|
+
- lib/bogus/minitest/spec.rb
|
347
281
|
- lib/bogus/mocking_dsl.rb
|
348
282
|
- lib/bogus/multi_stubber.rb
|
349
283
|
- lib/bogus/not_all_expectations_satisfied.rb
|
@@ -429,22 +363,87 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
429
363
|
- - ! '>='
|
430
364
|
- !ruby/object:Gem::Version
|
431
365
|
version: '0'
|
432
|
-
segments:
|
433
|
-
- 0
|
434
|
-
hash: -457091473
|
435
366
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
436
367
|
none: false
|
437
368
|
requirements:
|
438
369
|
- - ! '>='
|
439
370
|
- !ruby/object:Gem::Version
|
440
371
|
version: '0'
|
441
|
-
segments:
|
442
|
-
- 0
|
443
|
-
hash: -457091473
|
444
372
|
requirements: []
|
445
373
|
rubyforge_project: bogus
|
446
|
-
rubygems_version: 1.8.
|
374
|
+
rubygems_version: 1.8.15
|
447
375
|
signing_key:
|
448
376
|
specification_version: 3
|
449
377
|
summary: Create fakes to make your isolated unit tests reliable.
|
450
|
-
test_files:
|
378
|
+
test_files:
|
379
|
+
- features/authors.md
|
380
|
+
- features/changelog.md
|
381
|
+
- features/configuration/fake_ar_attributes.feature
|
382
|
+
- features/configuration/readme.md
|
383
|
+
- features/configuration/search_modules.feature
|
384
|
+
- features/contract_tests/contract_tests_mocks.feature
|
385
|
+
- features/contract_tests/contract_tests_spies.feature
|
386
|
+
- features/contract_tests/contract_tests_stubs.feature
|
387
|
+
- features/contract_tests/readme.md
|
388
|
+
- features/contract_tests/return_value_contracts.feature
|
389
|
+
- features/fakes/anonymous_doubles.feature
|
390
|
+
- features/fakes/duck_types.feature
|
391
|
+
- features/fakes/fake_objects.feature
|
392
|
+
- features/fakes/global_fake_configuration.feature
|
393
|
+
- features/fakes/readme.md
|
394
|
+
- features/fakes/replacing_classes.feature
|
395
|
+
- features/getting_started.md
|
396
|
+
- features/license.md
|
397
|
+
- features/minitest/minitest_support.feature
|
398
|
+
- features/readme.md
|
399
|
+
- features/safe_stubbing/argument_matchers.feature
|
400
|
+
- features/safe_stubbing/readme.md
|
401
|
+
- features/safe_stubbing/safe_mocking.feature
|
402
|
+
- features/safe_stubbing/safe_stubbing.feature
|
403
|
+
- features/safe_stubbing/spies.feature
|
404
|
+
- features/step_definitions/rspec_steps.rb
|
405
|
+
- features/support/env.rb
|
406
|
+
- spec/bogus/adds_recording_spec.rb
|
407
|
+
- spec/bogus/anything_spec.rb
|
408
|
+
- spec/bogus/class_methods_spec.rb
|
409
|
+
- spec/bogus/clean_ruby_spec.rb
|
410
|
+
- spec/bogus/configuration_spec.rb
|
411
|
+
- spec/bogus/converts_name_to_class_spec.rb
|
412
|
+
- spec/bogus/copies_classes_spec.rb
|
413
|
+
- spec/bogus/creates_fakes_spec.rb
|
414
|
+
- spec/bogus/creates_fakes_with_stubbed_methods_spec.rb
|
415
|
+
- spec/bogus/double_spec.rb
|
416
|
+
- spec/bogus/ensures_all_interactions_satisfied_spec.rb
|
417
|
+
- spec/bogus/fake_ar_attributes_spec.rb
|
418
|
+
- spec/bogus/fake_configuration_spec.rb
|
419
|
+
- spec/bogus/fake_registry_spec.rb
|
420
|
+
- spec/bogus/fakes_classes_spec.rb
|
421
|
+
- spec/bogus/faking_factories_spec.rb
|
422
|
+
- spec/bogus/frozen_fakes_spec.rb
|
423
|
+
- spec/bogus/have_received_matcher_spec.rb
|
424
|
+
- spec/bogus/instance_methods_spec.rb
|
425
|
+
- spec/bogus/interaction_spec.rb
|
426
|
+
- spec/bogus/interactions_repository_spec.rb
|
427
|
+
- spec/bogus/makes_ducks_spec.rb
|
428
|
+
- spec/bogus/makes_substitute_methods_spec.rb
|
429
|
+
- spec/bogus/method_copiers_spec.rb
|
430
|
+
- spec/bogus/mocking_dsl_spec.rb
|
431
|
+
- spec/bogus/multi_stubber_spec.rb
|
432
|
+
- spec/bogus/overwriten_classes_spec.rb
|
433
|
+
- spec/bogus/overwrites_classes_spec.rb
|
434
|
+
- spec/bogus/overwrites_methods_spec.rb
|
435
|
+
- spec/bogus/proxy_class_spec.rb
|
436
|
+
- spec/bogus/record_interactions_spec.rb
|
437
|
+
- spec/bogus/records_double_interactions_spec.rb
|
438
|
+
- spec/bogus/registers_created_fakes_spec.rb
|
439
|
+
- spec/bogus/resets_overwritten_classes_spec.rb
|
440
|
+
- spec/bogus/resets_stubbed_methods_spec.rb
|
441
|
+
- spec/bogus/ruby_2_support_spec.rb
|
442
|
+
- spec/bogus/shadow_spec.rb
|
443
|
+
- spec/bogus/tracks_existence_of_test_doubles_spec.rb
|
444
|
+
- spec/bogus/verifies_contracts_spec.rb
|
445
|
+
- spec/bogus/verifies_stub_definition_spec.rb
|
446
|
+
- spec/spec_helper.rb
|
447
|
+
- spec/support/fake_creator_of_fakes.rb
|
448
|
+
- spec/support/matchers.rb
|
449
|
+
- spec/support/sample_fake.rb
|