bogus 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  *.gem
2
2
  .bundle
3
+ coverage/
3
4
  pkg/*
4
5
  tmp/*
5
6
  .rvmrc
@@ -2,4 +2,5 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.2
4
4
  - 1.9.3
5
+ - 2.0
5
6
  script: bundle exec rspec spec && bundle exec cucumber --tag ~@wip
@@ -16,6 +16,13 @@ GEM
16
16
  builder (3.0.0)
17
17
  childprocess (0.3.2)
18
18
  ffi (~> 1.0.6)
19
+ colorize (0.5.8)
20
+ coveralls (0.6.7)
21
+ colorize
22
+ multi_json (~> 1.3)
23
+ rest-client
24
+ simplecov (>= 0.7)
25
+ thor
19
26
  cucumber (1.2.1)
20
27
  builder (>= 2.1.2)
21
28
  diff-lcs (>= 1.1.3)
@@ -45,6 +52,7 @@ GEM
45
52
  rb-fsevent (~> 0.9.1)
46
53
  rb-inotify (~> 0.8.8)
47
54
  mime-types (1.19)
55
+ multi_json (1.7.3)
48
56
  rake (0.9.2.2)
49
57
  rb-fchange (0.0.5)
50
58
  ffi
@@ -66,6 +74,10 @@ GEM
66
74
  rspec-expectations (2.10.0)
67
75
  diff-lcs (~> 1.1.3)
68
76
  rspec-mocks (2.10.1)
77
+ simplecov (0.7.1)
78
+ multi_json (~> 1.0)
79
+ simplecov-html (~> 0.7.1)
80
+ simplecov-html (0.7.1)
69
81
  thor (0.15.3)
70
82
 
71
83
  PLATFORMS
@@ -74,6 +86,7 @@ PLATFORMS
74
86
  DEPENDENCIES
75
87
  aruba
76
88
  bogus!
89
+ coveralls
77
90
  cucumber
78
91
  growl
79
92
  guard
data/README.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  [![build status](https://secure.travis-ci.org/psyho/bogus.png)](http://travis-ci.org/psyho/bogus)
4
4
  [![Code Climate](https://codeclimate.com/github/psyho/bogus.png)](https://codeclimate.com/github/psyho/bogus)
5
+ [![Coverage Status](https://coveralls.io/repos/psyho/bogus/badge.png?branch=master)](https://coveralls.io/r/psyho/bogus?branch=master)
6
+ [![Gem Version](https://badge.fury.io/rb/bogus.png)](http://badge.fury.io/rb/bogus)
7
+ [![Dependency Status](https://gemnasium.com/psyho/bogus.png)](https://gemnasium.com/psyho/bogus)
5
8
 
6
9
  ## What is Bogus?
7
10
 
@@ -33,4 +33,5 @@ Gem::Specification.new do |s|
33
33
  s.add_development_dependency 'libnotify'
34
34
  s.add_development_dependency 'rr'
35
35
  s.add_development_dependency 'relish'
36
+ s.add_development_dependency 'coveralls'
36
37
  end
@@ -14,7 +14,7 @@ Initial version.
14
14
  - Fixed a bug in copying ActiveRecord classes.
15
15
  - (internal) Replaced autoloads with require.
16
16
 
17
- ## 0.0.3 (not released yet)
17
+ ## 0.0.3
18
18
 
19
19
  - Global fake configuration
20
20
  - Inline method stubbing syntax
@@ -23,3 +23,7 @@ Initial version.
23
23
  - Replacing classes with fakes
24
24
  - Extracting common interface out of multpile classes to create duck types
25
25
 
26
+ ## 0.0.4
27
+
28
+ - Support mocking methods with optional parameters
29
+
@@ -11,7 +11,7 @@ Feature: Contract tests with spies
11
11
  end
12
12
 
13
13
  class Student
14
- def read(book, library = Libarary.new)
14
+ def read(book, library = Library.new)
15
15
  library.checkout(book)
16
16
  # ...
17
17
  end
@@ -1,4 +1,6 @@
1
1
  require 'dependor'
2
+ require 'erb'
3
+ require 'set'
2
4
 
3
5
  require_relative 'bogus/takes'
4
6
  require_relative 'bogus/record_interactions'
@@ -6,9 +8,9 @@ require_relative 'bogus/proxies_method_calls'
6
8
  require_relative 'bogus/rspec_extensions'
7
9
  require_relative 'bogus/rspec_adapter'
8
10
 
9
- all_files = Dir[File.expand_path('../**/*.rb', __FILE__)]
10
- all_files = all_files.reject{|f| f.include?('bogus/rspec') }.sort
11
- all_files.each { |f| require f }
11
+ all_files = Dir[File.expand_path('../bogus/**/*.rb', __FILE__)]
12
+ all_files = all_files.reject { |f| f.include?('bogus/rspec') }
13
+ all_files.sort.each { |f| require f }
12
14
 
13
15
  module Bogus
14
16
  extend PublicMethods
@@ -0,0 +1,4 @@
1
+ module Bogus
2
+ module DefaultValue
3
+ end
4
+ end
@@ -15,7 +15,11 @@ module Bogus
15
15
  end
16
16
 
17
17
  def any_args?
18
- args == [AnyArgs]
18
+ [AnyArgs] == args
19
+ end
20
+
21
+ def args
22
+ super.reject { |arg| arg.eql?(Bogus::DefaultValue) }
19
23
  end
20
24
 
21
25
  private
@@ -4,8 +4,8 @@ module Bogus
4
4
 
5
5
  takes :class_methods, :instance_methods, :makes_subtypes
6
6
 
7
- def make(klass, *classes)
8
- duck = makes_subtypes.make(klass)
7
+ def make(first_class, *classes)
8
+ duck = makes_subtypes.make(first_class)
9
9
  classes.each do |klass|
10
10
  remove_methods(class_methods.call(duck),
11
11
  class_methods.call(klass))
@@ -5,11 +5,10 @@ module Bogus
5
5
  takes :method_stringifier
6
6
 
7
7
  def stringify(method)
8
- args = method_stringifier.arguments_as_string(method.parameters)
9
- args_no_defaults = args.gsub(' = {}', '')
8
+ args = method_stringifier.argument_values(method.parameters)
10
9
 
11
10
  method_stringifier.stringify(method,
12
- "__record__(:#{method.name}, #{args_no_defaults})")
11
+ "__record__(:#{method.name}, #{args})")
13
12
  end
14
13
  end
15
14
  end
@@ -14,17 +14,18 @@ module Bogus
14
14
  arguments.map{|type, name| argument_to_string(name, type) }.compact.join(', ')
15
15
  end
16
16
 
17
+ def argument_values(arguments)
18
+ arguments_as_string(arguments).gsub(" = Bogus::DefaultValue", '')
19
+ end
20
+
17
21
  def argument_to_string(name, type)
18
- if type == :req
19
- name
20
- elsif type == :rest
21
- "*#{name}"
22
- elsif type == :block
23
- "&#{name}"
24
- elsif type == :opt
25
- "#{name} = {}"
26
- else
27
- raise "unknown argument type: #{type}"
22
+ case type
23
+ when :block then "&#{name}"
24
+ when :key then "#{name}: #{name}"
25
+ when :opt then "#{name} = Bogus::DefaultValue"
26
+ when :req then name
27
+ when :rest then "*#{name}"
28
+ else raise "unknown argument type: #{type}"
28
29
  end
29
30
  end
30
31
 
@@ -33,7 +33,7 @@ module Bogus
33
33
  end
34
34
 
35
35
  def unsatisfied_interactions
36
- @required.to_a - @calls
36
+ @required.reject { |i| @calls.include?(i) }
37
37
  end
38
38
 
39
39
  def self.has_shadow?(object)
@@ -2,7 +2,7 @@ module Bogus
2
2
  module Takes
3
3
  def takes(*args)
4
4
  include Dependor::Constructor(*args)
5
- attr_reader *args
5
+ attr_reader(*args)
6
6
  end
7
7
  end
8
8
  end
@@ -32,7 +32,7 @@ class Bogus::VerifiesStubDefinition
32
32
 
33
33
  def over_number_of_allowed_arguments?(method, args_count)
34
34
  return false if method.parameters.find{|type, name| type == :rest}
35
- number_of_arguments = method.parameters.count{|type, name| [:opt, :req].include?(type) }
35
+ number_of_arguments = method.parameters.count{|type, name| [:key, :opt, :req].include?(type) }
36
36
 
37
37
  args_count > number_of_arguments
38
38
  end
@@ -1,3 +1,3 @@
1
1
  module Bogus
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -5,6 +5,7 @@ describe Bogus::Interaction do
5
5
 
6
6
  same = [
7
7
  [[:foo, [:bar], "value"], [:foo, [:bar], "value"]],
8
+ [[:foo, [:bar, Bogus::DefaultValue], "value"], [:foo, [:bar], "value"]],
8
9
  [[:foo, [:bar]], [:foo, [:bar], "value"]],
9
10
  [[:foo, [:bar], "value"], [:foo, [:bar]]],
10
11
  [[:foo, [:bar]], [:foo, [:bar]]],
@@ -21,6 +22,7 @@ describe Bogus::Interaction do
21
22
  [[:foo, [:bar], "value"], [:foo, [:bar], "value2"]],
22
23
  [[:foo, [:bar], "value"], [:baz, [:bar], "value"]],
23
24
  [[:foo, [:baz], "value"], [:foo, [:bar], "value"]],
25
+ [[:foo, [Bogus::DefaultValue, :baz], "value"], [:foo, [:bar, :bar], "value"]],
24
26
  [[:foo, [Bogus::AnyArgs]], [:bar, [:bar]]],
25
27
  [[:foo, [:bar]], [:bar, [Bogus::AnyArgs]]],
26
28
  [[:foo, [Bogus::AnyArgs], "some value"], [:foo, [:bar], "other value"]],
@@ -76,4 +78,26 @@ describe Bogus::Interaction do
76
78
 
77
79
  first.should == second
78
80
  end
81
+
82
+ context 'when comparing arguments with custom #== implementations' do
83
+ Dev = Struct.new(:login) do
84
+ def ==(other)
85
+ login == other.login
86
+ end
87
+ end
88
+
89
+ it "considers two interactions == when the arguments are ==" do
90
+ first = Bogus::Interaction.new(:with, [Dev.new(:psyho)])
91
+ second = Bogus::Interaction.new(:with, [Dev.new(:psyho)])
92
+
93
+ first.should == second
94
+ end
95
+
96
+ it "considers two interactions != when the arguments are !=" do
97
+ first = Bogus::Interaction.new(:with, [Dev.new(:wrozka)])
98
+ second = Bogus::Interaction.new(:with, [Dev.new(:yundt)])
99
+
100
+ first.should_not == second
101
+ end
102
+ end
79
103
  end
@@ -15,7 +15,7 @@ module Bogus
15
15
  copy = makes_substitute_methods.stringify(SampleForCopyingMethods.method(:foo))
16
16
 
17
17
  copy.should == <<-EOF
18
- def foo(name, value = {}, *rest, &block)
18
+ def foo(name, value = Bogus::DefaultValue, *rest, &block)
19
19
  __record__(:foo, name, value, *rest, &block)
20
20
  end
21
21
  EOF
@@ -8,6 +8,9 @@ describe Bogus::MockingDSL do
8
8
  def hello(greeting, name)
9
9
  end
10
10
 
11
+ def with_optional_args(x, y = 1)
12
+ end
13
+
11
14
  def self.bar(baz)
12
15
  "Hello #{baz}"
13
16
  end
@@ -85,6 +88,12 @@ describe Bogus::MockingDSL do
85
88
  the_fake.should Stubber.have_received.foo("test", "test 2")
86
89
  }.to raise_error(ArgumentError)
87
90
  end
91
+
92
+ it "allows spying on methods with optional parameters" do
93
+ the_fake.with_optional_args(123)
94
+
95
+ the_fake.should Stubber.have_received.with_optional_args(123)
96
+ end
88
97
  end
89
98
 
90
99
  it "can be used with plain old Ruby objects" do
@@ -96,6 +105,15 @@ describe Bogus::MockingDSL do
96
105
  object.should Stubber.have_received.foo("test")
97
106
  end
98
107
 
108
+ it "allows spying on methods with optional parameters" do
109
+ object = ExampleFoo.new
110
+ Stubber.stub(object).with_optional_args(123) { 999 }
111
+
112
+ object.with_optional_args(123).should == 999
113
+
114
+ object.should Stubber.have_received.with_optional_args(123)
115
+ end
116
+
99
117
  class ClassWithMatches
100
118
  def matches?(something)
101
119
  end
@@ -136,12 +154,28 @@ describe Bogus::MockingDSL do
136
154
  let(:fake) { Bogus.fake_for(:example_foo) { ExampleFoo } }
137
155
 
138
156
  shared_examples_for "mocking dsl" do
139
- before do
140
- Mocker.mock(baz).foo("bar") { :return_value }
157
+ it "allows mocking on methods with optional parameters" do
158
+ Mocker.mock(baz).with_optional_args(1) { :return }
159
+
160
+ baz.with_optional_args(1).should == :return
161
+
162
+ expect { Bogus.after_each_test }.not_to raise_error
163
+ end
164
+
165
+ it "allows mocking with anything" do
166
+ Mocker.mock(baz).hello(1, Bogus::Anything) { :return }
167
+
168
+ baz.hello(1, 2).should == :return
169
+
170
+ expect { Bogus.after_each_test }.not_to raise_error
141
171
  end
142
172
 
143
173
  it "allows mocking the existing methods" do
174
+ Mocker.mock(baz).foo("bar") { :return_value }
175
+
144
176
  baz.foo("bar").should == :return_value
177
+
178
+ expect { Bogus.after_each_test }.not_to raise_error
145
179
  end
146
180
 
147
181
  it "verifies that the methods mocked exist" do
@@ -151,12 +185,16 @@ describe Bogus::MockingDSL do
151
185
  end
152
186
 
153
187
  it "raises errors when mocks were not called" do
188
+ Mocker.mock(baz).foo("bar")
189
+
154
190
  expect {
155
191
  Bogus.after_each_test
156
192
  }.to raise_error(Bogus::NotAllExpectationsSatisfied)
157
193
  end
158
194
 
159
195
  it "clears the data between tests" do
196
+ Mocker.mock(baz).foo("bar")
197
+
160
198
  Bogus.send(:clear_expectations)
161
199
 
162
200
  expect {
@@ -177,6 +177,14 @@ describe Bogus::Shadow do
177
177
  shadow.unsatisfied_interactions.should =~ [Bogus::Interaction.new(:foo, ["a", "b"])]
178
178
  end
179
179
 
180
+ it "removes the staisfied expectations from unsatisfied interactions" do
181
+ shadow.mocks(:with_optional_args, 'a')
182
+ shadow.run(:with_optional_args, 'a', Bogus::DefaultValue)
183
+ shadow.run(:foo, "a", "b")
184
+
185
+ shadow.unsatisfied_interactions.should be_empty
186
+ end
187
+
180
188
  include_examples "spying on shadows"
181
189
  end
182
190
  end
@@ -1,3 +1,14 @@
1
+ require 'simplecov'
2
+ require 'coveralls'
3
+
4
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
5
+ SimpleCov::Formatter::HTMLFormatter,
6
+ Coveralls::SimpleCov::Formatter]
7
+
8
+ SimpleCov.start do
9
+ add_filter "/spec/"
10
+ end
11
+
1
12
  require 'bogus'
2
13
  require 'dependor/rspec'
3
14
 
@@ -6,6 +17,7 @@ require 'rr'
6
17
  require_relative 'support/sample_fake'
7
18
  require_relative 'support/fake_creator_of_fakes'
8
19
 
20
+
9
21
  RSpec.configure do |config|
10
22
  config.color_enabled = true
11
23
  config.mock_framework = :rr
@@ -7,6 +7,9 @@ module Samples
7
7
  def bar
8
8
  "the real bar"
9
9
  end
10
+
11
+ def with_optional_args(a, b = :opt)
12
+ end
10
13
  end
11
14
 
12
15
  FooFake = Bogus::Injector.new.copies_classes.copy(Foo)
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.0.3
4
+ version: 0.0.4
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-04-22 00:00:00.000000000 Z
12
+ date: 2013-05-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dependor
16
- requirement: &70273273666380 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: 0.0.4
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70273273666380
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.0.4
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: rake
27
- requirement: &70273273665940 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: '0'
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *70273273665940
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: rspec
38
- requirement: &70273273665440 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: '0'
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *70273273665440
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: cucumber
49
- requirement: &70273273664900 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ! '>='
@@ -54,10 +69,15 @@ dependencies:
54
69
  version: '0'
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *70273273664900
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
58
78
  - !ruby/object:Gem::Dependency
59
79
  name: aruba
60
- requirement: &70273273664340 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ! '>='
@@ -65,10 +85,15 @@ dependencies:
65
85
  version: '0'
66
86
  type: :development
67
87
  prerelease: false
68
- version_requirements: *70273273664340
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
69
94
  - !ruby/object:Gem::Dependency
70
95
  name: guard
71
- requirement: &70273273663500 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
72
97
  none: false
73
98
  requirements:
74
99
  - - ! '>='
@@ -76,10 +101,15 @@ dependencies:
76
101
  version: '0'
77
102
  type: :development
78
103
  prerelease: false
79
- version_requirements: *70273273663500
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
80
110
  - !ruby/object:Gem::Dependency
81
111
  name: guard-rspec
82
- requirement: &70273273662220 !ruby/object:Gem::Requirement
112
+ requirement: !ruby/object:Gem::Requirement
83
113
  none: false
84
114
  requirements:
85
115
  - - ! '>='
@@ -87,10 +117,15 @@ dependencies:
87
117
  version: '0'
88
118
  type: :development
89
119
  prerelease: false
90
- version_requirements: *70273273662220
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
91
126
  - !ruby/object:Gem::Dependency
92
127
  name: guard-cucumber
93
- requirement: &70273273661600 !ruby/object:Gem::Requirement
128
+ requirement: !ruby/object:Gem::Requirement
94
129
  none: false
95
130
  requirements:
96
131
  - - ! '>='
@@ -98,10 +133,15 @@ dependencies:
98
133
  version: '0'
99
134
  type: :development
100
135
  prerelease: false
101
- version_requirements: *70273273661600
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
102
142
  - !ruby/object:Gem::Dependency
103
143
  name: guard-ctags-bundler
104
- requirement: &70273273660820 !ruby/object:Gem::Requirement
144
+ requirement: !ruby/object:Gem::Requirement
105
145
  none: false
106
146
  requirements:
107
147
  - - ! '>='
@@ -109,10 +149,15 @@ dependencies:
109
149
  version: '0'
110
150
  type: :development
111
151
  prerelease: false
112
- version_requirements: *70273273660820
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
113
158
  - !ruby/object:Gem::Dependency
114
159
  name: growl
115
- requirement: &70273273660380 !ruby/object:Gem::Requirement
160
+ requirement: !ruby/object:Gem::Requirement
116
161
  none: false
117
162
  requirements:
118
163
  - - ! '>='
@@ -120,10 +165,15 @@ dependencies:
120
165
  version: '0'
121
166
  type: :development
122
167
  prerelease: false
123
- version_requirements: *70273273660380
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
124
174
  - !ruby/object:Gem::Dependency
125
175
  name: libnotify
126
- requirement: &70273273659840 !ruby/object:Gem::Requirement
176
+ requirement: !ruby/object:Gem::Requirement
127
177
  none: false
128
178
  requirements:
129
179
  - - ! '>='
@@ -131,10 +181,15 @@ dependencies:
131
181
  version: '0'
132
182
  type: :development
133
183
  prerelease: false
134
- version_requirements: *70273273659840
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ! '>='
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
135
190
  - !ruby/object:Gem::Dependency
136
191
  name: rr
137
- requirement: &70273273658780 !ruby/object:Gem::Requirement
192
+ requirement: !ruby/object:Gem::Requirement
138
193
  none: false
139
194
  requirements:
140
195
  - - ! '>='
@@ -142,10 +197,31 @@ dependencies:
142
197
  version: '0'
143
198
  type: :development
144
199
  prerelease: false
145
- version_requirements: *70273273658780
200
+ version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
146
206
  - !ruby/object:Gem::Dependency
147
207
  name: relish
148
- requirement: &70273273657940 !ruby/object:Gem::Requirement
208
+ requirement: !ruby/object:Gem::Requirement
209
+ none: false
210
+ requirements:
211
+ - - ! '>='
212
+ - !ruby/object:Gem::Version
213
+ version: '0'
214
+ type: :development
215
+ prerelease: false
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ! '>='
220
+ - !ruby/object:Gem::Version
221
+ version: '0'
222
+ - !ruby/object:Gem::Dependency
223
+ name: coveralls
224
+ requirement: !ruby/object:Gem::Requirement
149
225
  none: false
150
226
  requirements:
151
227
  - - ! '>='
@@ -153,7 +229,12 @@ dependencies:
153
229
  version: '0'
154
230
  type: :development
155
231
  prerelease: false
156
- version_requirements: *70273273657940
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ none: false
234
+ requirements:
235
+ - - ! '>='
236
+ - !ruby/object:Gem::Version
237
+ version: '0'
157
238
  description: Decreases the need to write integration tests by ensuring that the things
158
239
  you stub or mock actually exist.
159
240
  email:
@@ -208,6 +289,7 @@ files:
208
289
  - lib/bogus/copies_methods.rb
209
290
  - lib/bogus/creates_fakes.rb
210
291
  - lib/bogus/creates_fakes_with_stubbed_methods.rb
292
+ - lib/bogus/default_value.rb
211
293
  - lib/bogus/double.rb
212
294
  - lib/bogus/ensures_all_interactions_satisfied.rb
213
295
  - lib/bogus/fake.rb
@@ -246,10 +328,10 @@ files:
246
328
  - lib/bogus/rspec_extensions.rb
247
329
  - lib/bogus/shadow.rb
248
330
  - lib/bogus/takes.rb
331
+ - lib/bogus/tracks_existence_of_test_doubles.rb
249
332
  - lib/bogus/verifies_contracts.rb
250
333
  - lib/bogus/verifies_stub_definition.rb
251
334
  - lib/bogus/version.rb
252
- - lib/tracks_existence_of_test_doubles.rb
253
335
  - pelusa.sh
254
336
  - rbs.sh
255
337
  - spec/bogus/adds_recording_spec.rb
@@ -283,12 +365,12 @@ files:
283
365
  - spec/bogus/resets_overwritten_classes_spec.rb
284
366
  - spec/bogus/resets_stubbed_methods_spec.rb
285
367
  - spec/bogus/shadow_spec.rb
368
+ - spec/bogus/tracks_existence_of_test_doubles_spec.rb
286
369
  - spec/bogus/verifies_contracts_spec.rb
287
370
  - spec/bogus/verifies_stub_definition_spec.rb
288
371
  - spec/spec_helper.rb
289
372
  - spec/support/fake_creator_of_fakes.rb
290
373
  - spec/support/sample_fake.rb
291
- - spec/tracks_existence_of_test_doubles_spec.rb
292
374
  homepage: https://github.com/psyho/bogus
293
375
  licenses: []
294
376
  post_install_message:
@@ -309,69 +391,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
309
391
  version: '0'
310
392
  requirements: []
311
393
  rubyforge_project: bogus
312
- rubygems_version: 1.8.15
394
+ rubygems_version: 1.8.25
313
395
  signing_key:
314
396
  specification_version: 3
315
397
  summary: Create fakes to make your isolated unit tests reliable.
316
- test_files:
317
- - features/authors.md
318
- - features/changelog.md
319
- - features/configuration_options.feature
320
- - features/contract_tests/contract_tests_mocks.feature
321
- - features/contract_tests/contract_tests_spies.feature
322
- - features/contract_tests/contract_tests_stubs.feature
323
- - features/contract_tests/readme.md
324
- - features/contract_tests/return_value_contracts.feature
325
- - features/fakes/anonymous_doubles.feature
326
- - features/fakes/duck_types.feature
327
- - features/fakes/fake_objects.feature
328
- - features/fakes/global_fake_configuration.feature
329
- - features/fakes/readme.md
330
- - features/fakes/replacing_classes.feature
331
- - features/getting_started.md
332
- - features/license.md
333
- - features/readme.md
334
- - features/safe_stubbing/argument_matchers.feature
335
- - features/safe_stubbing/readme.md
336
- - features/safe_stubbing/safe_mocking.feature
337
- - features/safe_stubbing/safe_stubbing.feature
338
- - features/safe_stubbing/spies.feature
339
- - features/step_definitions/rspec_steps.rb
340
- - features/support/env.rb
341
- - spec/bogus/adds_recording_spec.rb
342
- - spec/bogus/anything_spec.rb
343
- - spec/bogus/class_methods_spec.rb
344
- - spec/bogus/configuration_spec.rb
345
- - spec/bogus/converts_name_to_class_spec.rb
346
- - spec/bogus/copies_classes_spec.rb
347
- - spec/bogus/creates_fakes_spec.rb
348
- - spec/bogus/creates_fakes_with_stubbed_methods_spec.rb
349
- - spec/bogus/double_spec.rb
350
- - spec/bogus/ensures_all_interactions_satisfied_spec.rb
351
- - spec/bogus/fake_configuration_spec.rb
352
- - spec/bogus/fake_registry_spec.rb
353
- - spec/bogus/fakes_classes_spec.rb
354
- - spec/bogus/have_received_matcher_spec.rb
355
- - spec/bogus/instance_methods_spec.rb
356
- - spec/bogus/interaction_spec.rb
357
- - spec/bogus/interactions_repository_spec.rb
358
- - spec/bogus/makes_ducks_spec.rb
359
- - spec/bogus/makes_substitute_methods_spec.rb
360
- - spec/bogus/mocking_dsl_spec.rb
361
- - spec/bogus/multi_stubber_spec.rb
362
- - spec/bogus/overwriten_classes_spec.rb
363
- - spec/bogus/overwrites_classes_spec.rb
364
- - spec/bogus/overwrites_methods_spec.rb
365
- - spec/bogus/proxy_class_spec.rb
366
- - spec/bogus/record_interactions_spec.rb
367
- - spec/bogus/records_double_interactions_spec.rb
368
- - spec/bogus/registers_created_fakes_spec.rb
369
- - spec/bogus/resets_overwritten_classes_spec.rb
370
- - spec/bogus/resets_stubbed_methods_spec.rb
371
- - spec/bogus/shadow_spec.rb
372
- - spec/bogus/verifies_contracts_spec.rb
373
- - spec/bogus/verifies_stub_definition_spec.rb
374
- - spec/spec_helper.rb
375
- - spec/support/fake_creator_of_fakes.rb
376
- - spec/support/sample_fake.rb
377
- - spec/tracks_existence_of_test_doubles_spec.rb
398
+ test_files: []