stubberry 0.1.0 → 0.3.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76a44be83df94f95993dad5da5a540ec3b5f7d6a3334b45fb9f19d64f11445bd
4
- data.tar.gz: 7644abf117453f0635e8f14899d400f515c3a3ed763a3fff3737aa3ebb24408a
3
+ metadata.gz: ee7c2b90c9dd5e32707924b85ad8e2b88d40fc3617d1404ee839227b21ebf414
4
+ data.tar.gz: 43760ddf930c7d4a3a0a582c6f705ea39d218b3e84619345785e58df68461312
5
5
  SHA512:
6
- metadata.gz: 7c205abde785d061fab126fe889aa87cf611dc9851697aca91ba3e1ddd3c1d2dcac7ce2e1226f4aa6298027ba521913177547db185382ff77b9d85566e88d003
7
- data.tar.gz: '0579be30cd4c3e44e492f3262417105feeff44fdf48cbaa0ebfffd3b56e8337571051bc6eb50f8dbdf53e433e82e8c0a33bf7fc48ec3a6d38a48b071a320fdb2'
6
+ metadata.gz: 5a89ea231eb74516a8b1e3cfdad53fcb9efabc11d10cd31e5fd954441ef76ffe4caf75581b226e2cdcae7c1b09fed9cfe72cb80e10ea951e33dda15f373bc934
7
+ data.tar.gz: 6fb0d51c8f5ecf01ba4b670e4e50fb5456d63159c396166f27be21f63e793849f22a077704c2522716a510ad1168cb255d612c2fc2d633da10578789a0ea7279
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ /.idea/
data/.rubocop.yml ADDED
@@ -0,0 +1,2 @@
1
+ inherit_gem:
2
+ rubocop-shopify: rubocop.yml
data/CHANGELOG.md ADDED
@@ -0,0 +1,20 @@
1
+ # 0.3.0
2
+ * rubocop-shopify added as a base linter
3
+ * assertion for method called rewritten to use stub_must under the hood
4
+ * DRYied some methods to Stubberry module methods
5
+ * introduced ruby 3.0 kwargs compatible signatures
6
+
7
+
8
+ # 0.2.0
9
+ * new module with assertion methods added
10
+ * assert_method_called added, this is a flow assertion, you can check the params, and you can check that method was called inside the block,
11
+ without stubbing objects and interfering with the original flow
12
+ * minimal ruby version set to 2.5 ( so we can replace indirect invocations via send(:*_method ) to direct invocations )
13
+ * singleton_classes is now properly cleared after, see PR: https://github.com/seattlerb/minitest/pull/891
14
+ * some methods got '__' prefixes, just to prevent naming collisions
15
+
16
+
17
+ # 0.1.1
18
+ * initial gem release
19
+ * Stubberry::Object module with stub_must, stub_must_not, stub_must_all, stub_if_* methods
20
+ * Stubberry::ActiveRecord easy id based stubbing active record objects inside some actions flow
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source "https://rubygems.org"
2
4
 
3
5
  # Specify your gem's dependencies in stubberry.gemspec
data/README.md CHANGED
@@ -1,15 +1,21 @@
1
1
  # Stubberry
2
+ Pay attention it has 2Bs and 2Rs in naming :)
2
3
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/stubberry`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
4
+ This gem is planned to be an ultimate sweet collection of stubbing methods for any kinds of testing.
5
+ Any new cool stubbing suggestions are welcome.
6
6
 
7
7
  ## Installation
8
8
 
9
9
  Add this line to your application's Gemfile:
10
10
 
11
11
  ```ruby
12
- gem 'stubberry'
12
+ # stubberry extends Object methods, so it should not be required in production
13
+ group :test, :development do
14
+ gem 'stubberry'
15
+ end
16
+
17
+ #OR
18
+ gem 'stubberry', group: [:test, :development]
13
19
  ```
14
20
 
15
21
  And then execute:
@@ -22,7 +28,125 @@ Or install it yourself as:
22
28
 
23
29
  ## Usage
24
30
 
25
- TODO: Write usage instructions here
31
+ Version 0.1 of this gem has two cool sets of stub methods Stubberry::Object and Stubberry::ActiveRecord
32
+
33
+
34
+ ### Stubberry::Object
35
+
36
+ Set of stubbing methods added to an Object class hence available for any class or its instances.
37
+
38
+ ```ruby
39
+
40
+ # stub_must( name, val_or_callable, *block_args )
41
+ # raise error functionality whenever stubbed method wasn't called
42
+
43
+ test 'check mehtod "run" params and execution' do
44
+ class_or_obj.stub_must(:run, -> ( param ) {
45
+ # Now you can be sure that execution was here and either you have an expected param, OR
46
+ # if call didn't happened you will see a StandardError raised
47
+ assert_equal( param, 1 )
48
+ } ) { class_or_obj.run(1) }
49
+ end
50
+
51
+ ```
52
+
53
+ Rem: I know about Mock object, but I don't like it. You may consider approach with mock/verify better or more object oriented e.t.c.
54
+ But I do like an error to be aligned to the check, running mock.verify some place after check did happened, feels unnatural and uncomfortable to me
55
+
56
+ ```ruby
57
+
58
+ # stub_must_not( name, message = nil )
59
+ # the reverse method of stub_must -- will raise an issue whenever method
60
+ # **was** called inside a stubbing block, ensures that flow didn't reach given method
61
+ test 'call must not happened' do
62
+ # nothing raised
63
+ class_or_obj.stub_must_not(:run) { class_or_obj.call(1) }
64
+ # StandardError will be raised:
65
+ class_or_obj.stub_must_not(:run) { class_or_obj.run(1) }
66
+ end
67
+
68
+ # stub_must_all( name_to_var_or_callable, &block )
69
+ # just for fun multiple stub_must in one call, will raise one error for any amount of missing method's calls
70
+ test 'all calls should happened' do
71
+ class_or_obj.stub_must_all(
72
+ run: true,
73
+ call: -> (param) { assert_equal(param, 1) }
74
+ ) do
75
+ class_or_obj.call(1)
76
+ class_or_obj.run(args)
77
+ end
78
+ end
79
+
80
+ # stub_if_def(name, val_or_callable, *block_args, &block)
81
+ # stub only if method present on the object, otherwise just execute block.
82
+ # It's a really rare case, I used only once for incompatible gems versions test.
83
+ # When I needed to check that the execution flow can survive missing methods.
84
+ #
85
+ test 'all calls should happened' do
86
+ class_or_obj.stub_if_def( :not_def, -> (param) { assert_equal(param, :param) } ) do
87
+ # when there is nothing to stub, just yield
88
+ :just_yield_this_without_stubbing
89
+ end
90
+ end
91
+
92
+ # stub_must_if_def(name, val_or_callable, *block_args, &block)
93
+ # same as above but with stub_must under the hood
94
+ ```
95
+
96
+ ### Stubberry::ActiveRecord
97
+
98
+ Easy stubbing for ActiveRecord objects, you just need the id and Stubberry will do the rest.
99
+ The cool stuff about these stubbing methods is an independence from the way object retrieved.
100
+ You can get object via find, where or any relation, it doesn't matter.
101
+ Stubbing is based on after_find callback, so whenever object instantiated
102
+ it will be properly stubbed.
103
+
104
+ ```ruby
105
+ # you can stub active record object attributes with stub_orm_attr
106
+
107
+ test 'object attributes will be stubbed in relations' do
108
+ Comment.stub_orm_attr(1, {body: 'ola!'} ) do
109
+ assert_equal( 'ola!', User.first.comments.where(id: 1).take.body )
110
+ assert_equal( 'ola!', Comment.find(1).body )
111
+ end
112
+ end
113
+
114
+ # you can stub active record object method with stub_orm_method
115
+ test 'object with a given id got method stubbed' do
116
+ Comment.stub_orm_method(1, join: -> ( other ) {
117
+ assert_equal( other.id, 2 )
118
+ } ) do
119
+ User.first.comments.where(id: 1).each{ _1.join( Comment.find(2) ) }
120
+ end
121
+ end
122
+ ```
123
+
124
+ ### Stubberry::Assertions
125
+
126
+ Control flow without interference, you want to be sure that method called and stubbing either to verbose or problematic.
127
+
128
+ ```ruby
129
+
130
+ class YouTest < Minitest::TestCase
131
+
132
+ include Stubberry::Assertions
133
+
134
+ test 'save called without object interference' do
135
+ cmnt = Comment.new
136
+ assert_difference( -> { Comment.count } ) do
137
+ assert_method_called( cmnt, :save ) { cmnt.save }
138
+ end
139
+ end
140
+
141
+ test 'gently check method params' do
142
+ cmnt = Comment.new
143
+ assert_method_called( cmnt, :save, -> (options) {
144
+ assert_equal( options, {validate: false} )
145
+ } ) { cmnt.save(validate: false) }
146
+ end
147
+ end
148
+ ```
149
+
26
150
 
27
151
  ## Development
28
152
 
@@ -32,7 +156,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
156
 
33
157
  ## Contributing
34
158
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/stubberry. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/stubberry/blob/master/CODE_OF_CONDUCT.md).
159
+ Bug reports and pull requests are welcome on GitHub at https://github.com/alekseyl/stubberry. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/stubberry/blob/master/CODE_OF_CONDUCT.md).
36
160
 
37
161
 
38
162
  ## License
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bundler/gem_tasks"
2
4
  require "rake/testtask"
3
5
 
@@ -7,4 +9,4 @@ Rake::TestTask.new(:test) do |t|
7
9
  t.test_files = FileList["test/**/*_test.rb"]
8
10
  end
9
11
 
10
- task :default => :test
12
+ task default: :test
data/bin/console CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require "bundler/setup"
4
5
  require "stubberry"
@@ -0,0 +1,90 @@
1
+ # frozen_string_literal: true
2
+
3
+ # this module provide two methods for active record classes
4
+ # to easily stub any record attributes and methods disregarding the way
5
+ # record was obtained inside the yielding block, you just need an id.
6
+ #
7
+ # i.e. alternative way of dealing with any record with id could be stub of
8
+ # the specific method like where or find with a given set of params e.t.c.
9
+ # that's a very error prone approach, with stub_orm_* methods we
10
+ # do not care about the way object was obtained as long as after_find
11
+ # callback was executed
12
+ module Stubberry
13
+ module ActiveRecord
14
+ extend ActiveSupport::Concern
15
+
16
+ # for any active record object for classes included Stubberry::ActiveRecord
17
+ # we adding after_find callback extending object with self.class.extend_any
18
+ # default implementation of self.class.extend_any does nothing
19
+ included do
20
+ after_find { |obj| self.class.__extend_any(obj) }
21
+ end
22
+
23
+ module ClassMethods
24
+ # This method could be used whenever there is a need for stubbing
25
+ # the exact ActiveRecord object attributes inside some execution flow
26
+ # __WITHOUT__!! underlying record change
27
+ def stub_orm_attr(id, obj_or_attributes, &block)
28
+ stub(:__extend_any, ->(obj) {
29
+ return unless obj.id == id && obj.is_a?(self)
30
+
31
+ obj.assign_attributes(obj_or_attributes.try(:attributes) || obj_or_attributes)
32
+ }, &block)
33
+ end
34
+
35
+ # This method could be used whenever there is a need for stubbing
36
+ # the specific Active Record object's methods inside some flow piece
37
+ # with ANY way of object retrieval
38
+ def stub_orm_method(id, method, val_or_callable, *block_args, **block_kwargs, &block)
39
+ stub(:__extend_any, ->(obj) {
40
+ return unless obj.id == id && obj.is_a?(self)
41
+
42
+ __define_stub_method(obj, method, val_or_callable, *block_args, **block_kwargs)
43
+ }, &block)
44
+ ensure
45
+ __revert_all_methods(id, method)
46
+ end
47
+
48
+ def __define_stub_method(object, method, val_or_callable, *block_args, **block_kwargs)
49
+ method_new_name = __stub_method_name(method, obj: object)
50
+
51
+ Stubberry.__define_method_mimic_replacement(object, method)
52
+
53
+ object.singleton_class.alias_method(method_new_name, method)
54
+
55
+ object.define_singleton_method(method) do |*args, **kwargs, &blk|
56
+ if val_or_callable.respond_to?(:call)
57
+ val_or_callable.call(*args, **kwargs, &blk)
58
+ else
59
+ blk&.call(*block_args, **block_kwargs)
60
+ val_or_callable
61
+ end
62
+ end
63
+ __stubbed_objects(method_new_name) << object
64
+ end
65
+
66
+ def __stub_method_name(method, obj: nil, id: nil)
67
+ # __stub_class_method_id
68
+ "__stub_#{self}_#{method}_#{obj&.id || id}"
69
+ end
70
+
71
+ def __revert_all_methods(id, method)
72
+ method_new_name = __stub_method_name(method, id: id)
73
+
74
+ __stubbed_objects(method_new_name).map(&:singleton_class).each do |metaclass|
75
+ metaclass.send(:undef_method, method)
76
+ metaclass.send(:alias_method, method, method_new_name)
77
+ metaclass.send(:undef_method, method_new_name)
78
+ end
79
+ end
80
+
81
+ def __stubbed_objects(method_name)
82
+ (@@__extended_objects ||= {})[method_name] ||= [] # rubocop:disable Style/ClassVars
83
+ end
84
+
85
+ def __extend_any(_obj)
86
+ :do_nothing
87
+ end
88
+ end
89
+ end
90
+ end if defined?(ActiveRecord)
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stubberry
4
+ module Assertions
5
+ # controlling the flow with minimum side effects
6
+ def assert_method_called(object, method, inspect_params_callable = nil, &block)
7
+ object_unbound_method = object.method(method.to_sym).unbind
8
+ object.stub_must(method, ->(*args, **kwargs, &blk) {
9
+ inspect_params_callable&.call(*args, **kwargs)
10
+ object_unbound_method.bind(object).call(*args, **kwargs, &blk)
11
+ }, &block)
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,82 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stubberry
4
+ module Object
5
+ # this is an enrichment of an original stub method from the minitest/mock
6
+ def stub_must(name, val_or_callable, *block_args, **block_kwargs)
7
+ method_new_name = "__minitest_stub__#{name}"
8
+
9
+ singleton_has_stubbing_method = singleton_methods.map(&:to_s).include?(name.to_s)
10
+
11
+ Stubberry.__define_method_mimic_replacement(self, name)
12
+
13
+ singleton_class.alias_method(method_new_name, name)
14
+
15
+ call_happened = []
16
+
17
+ singleton_class.define_method(name) do |*args, **kwargs, &blk|
18
+ call_happened << true
19
+
20
+ if val_or_callable.respond_to?(:call)
21
+ val_or_callable.call(*args, **kwargs, &blk)
22
+ else
23
+ blk&.call(*block_args, **block_kwargs)
24
+ val_or_callable
25
+ end
26
+ end
27
+
28
+ (yield self).tap do
29
+ raise "#{name} wasn't called" if call_happened.empty?
30
+ end
31
+ ensure
32
+ singleton_class.__stbr_clear_singleton_class(name, method_new_name, singleton_has_stubbing_method)
33
+ end
34
+
35
+ # the reverse method of stub_must -- will raise an issue whenever method
36
+ # was called inside a stubbing block
37
+ def stub_must_not(name, message = nil)
38
+ method_new_name = "__minitest_stub__#{name}"
39
+ singleton_has_stubbing_method = singleton_methods.map(&:to_s).include?(name.to_s)
40
+
41
+ Stubberry.__define_method_mimic_replacement(self, name)
42
+
43
+ singleton_class.alias_method(method_new_name, name)
44
+
45
+ singleton_class.define_method(name) { |*| raise message || "#{name} was called!" }
46
+
47
+ yield self
48
+ ensure
49
+ singleton_class.__stbr_clear_singleton_class(name, method_new_name, singleton_has_stubbing_method)
50
+ end
51
+
52
+ # just for fun multiple stub_must in one call
53
+ def stub_must_all(name_to_var_or_callable, &block)
54
+ if name_to_var_or_callable.length == 1
55
+ stub_must(*name_to_var_or_callable.shift, &block)
56
+ else
57
+ stub_must(*name_to_var_or_callable.shift) { stub_must_all(name_to_var_or_callable, &block) }
58
+ end
59
+ end
60
+
61
+ # stub only if respond otherwise just execute
62
+ def stub_if_def(name, val_or_callable, *block_args, &block)
63
+ respond_to?(name) ? stub(name, val_or_callable, *block_args, &block) : yield
64
+ end
65
+
66
+ # stub_must only if respond otherwise just execute
67
+ def stub_must_if_def(name, val_or_callable, *block_args, &block)
68
+ # stub only if respond otherwise just execute
69
+ respond_to?(name) ? stub_must(name, val_or_callable, *block_args, &block) : yield
70
+ end
71
+
72
+ def __stbr_clear_singleton_class(name, new_name, had_method_before)
73
+ raise Stubberry::Error, "This is a singleton_class methods only!" unless singleton_class?
74
+
75
+ remove_method(name)
76
+ alias_method(name, new_name) if had_method_before
77
+ remove_method(new_name)
78
+ end
79
+ end
80
+ end
81
+
82
+ Object.include(Stubberry::Object)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Stubberry
2
- VERSION = "0.1.0"
4
+ VERSION = "0.3.0"
3
5
  end
data/lib/stubberry.rb CHANGED
@@ -1,6 +1,22 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "stubberry/version"
4
+ require "stubberry/object"
5
+ require "stubberry/active_record"
6
+ require "stubberry/assertions"
2
7
 
3
8
  module Stubberry
4
9
  class Error < StandardError; end
5
- # Your code goes here...
10
+
11
+ def self.__define_method_mimic_replacement(object, method)
12
+ return unless __is_a_method_mimic?(object, method)
13
+
14
+ object.define_singleton_method(method) { |*args, **kargs, &block| super(*args, **kargs, &block) }
15
+ end
16
+
17
+ # object responds to 'method' but, the are no such method among methods,
18
+ # i.e. it's run through a method_missing
19
+ def self.__is_a_method_mimic?(object, method)
20
+ object.respond_to?(method) && !object.methods.map(&:to_s).include?(method.to_s)
21
+ end
6
22
  end
data/stubberry.gemspec CHANGED
@@ -1,4 +1,6 @@
1
- require_relative 'lib/stubberry/version'
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/stubberry/version"
2
4
 
3
5
  Gem::Specification.new do |spec|
4
6
  spec.name = "stubberry"
@@ -6,11 +8,12 @@ Gem::Specification.new do |spec|
6
8
  spec.authors = ["alekseyl"]
7
9
  spec.email = ["leshchuk@gmail.com"]
8
10
 
9
- spec.summary = %q{This a small set of stub extensions to Object interface.}
10
- spec.description = %q{This a small set of stub extensions to Object interface. There will be stub_must, stub_must_not, stub_if_def, stub_any_ar methods on it }
11
+ spec.summary = "Ultimate collection of sweet stub methods for ruby test suits. Lets stub! "
12
+ spec.description = "This a ultimate set of stub extensions. Suggest any reasonable subbing and I'll try to "\
13
+ "merge it. It will start with: stub_must, stub_must_not, stub_if_def and many more "
11
14
  spec.homepage = "https://github.com/alekseyl/stubberry"
12
15
  spec.license = "MIT"
13
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
16
+ spec.required_ruby_version = ">= 2.5"
14
17
 
15
18
  spec.metadata["allowed_push_host"] = "https://rubygems.org"
16
19
 
@@ -20,10 +23,20 @@ Gem::Specification.new do |spec|
20
23
 
21
24
  # Specify which files should be added to the gem when it is released.
22
25
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
24
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
+ spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
27
+ %x(git ls-files -z).split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
28
  end
26
29
  spec.bindir = "exe"
27
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
31
  spec.require_paths = ["lib"]
32
+
33
+ spec.add_development_dependency("activerecord", ">= 6.1")
34
+
35
+ spec.add_development_dependency("bundler", ">= 1")
36
+ spec.add_development_dependency("minitest", "~> 5.0")
37
+ spec.add_development_dependency("rake", ">= 12.3.3")
38
+ spec.add_development_dependency("sqlite3")
39
+
40
+ spec.add_development_dependency("rubocop-shopify")
41
+ spec.add_development_dependency("ruby_jard")
29
42
  end
metadata CHANGED
@@ -1,17 +1,116 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stubberry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - alekseyl
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-02 00:00:00.000000000 Z
12
- dependencies: []
13
- description: 'This a small set of stub extensions to Object interface. There will
14
- be stub_must, stub_must_not, stub_if_def, stub_any_ar methods on it '
11
+ date: 2022-07-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activerecord
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '6.1'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '6.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '1'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '1'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '5.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '5.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 12.3.3
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 12.3.3
69
+ - !ruby/object:Gem::Dependency
70
+ name: sqlite3
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop-shopify
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: ruby_jard
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: 'This a ultimate set of stub extensions. Suggest any reasonable subbing
112
+ and I''ll try to merge it. It will start with: stub_must, stub_must_not, stub_if_def
113
+ and many more '
15
114
  email:
16
115
  - leshchuk@gmail.com
17
116
  executables: []
@@ -19,9 +118,9 @@ extensions: []
19
118
  extra_rdoc_files: []
20
119
  files:
21
120
  - ".gitignore"
22
- - ".idea/inspectionProfiles/profiles_settings.xml"
23
- - ".idea/workspace.xml"
121
+ - ".rubocop.yml"
24
122
  - ".travis.yml"
123
+ - CHANGELOG.md
25
124
  - CODE_OF_CONDUCT.md
26
125
  - Gemfile
27
126
  - LICENSE.txt
@@ -30,6 +129,9 @@ files:
30
129
  - bin/console
31
130
  - bin/setup
32
131
  - lib/stubberry.rb
132
+ - lib/stubberry/active_record.rb
133
+ - lib/stubberry/assertions.rb
134
+ - lib/stubberry/object.rb
33
135
  - lib/stubberry/version.rb
34
136
  - stubberry.gemspec
35
137
  homepage: https://github.com/alekseyl/stubberry
@@ -48,15 +150,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
48
150
  requirements:
49
151
  - - ">="
50
152
  - !ruby/object:Gem::Version
51
- version: 2.3.0
153
+ version: '2.5'
52
154
  required_rubygems_version: !ruby/object:Gem::Requirement
53
155
  requirements:
54
156
  - - ">="
55
157
  - !ruby/object:Gem::Version
56
158
  version: '0'
57
159
  requirements: []
58
- rubygems_version: 3.1.4
160
+ rubygems_version: 3.2.15
59
161
  signing_key:
60
162
  specification_version: 4
61
- summary: This a small set of stub extensions to Object interface.
163
+ summary: Ultimate collection of sweet stub methods for ruby test suits. Lets stub!
62
164
  test_files: []
@@ -1,5 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <settings>
3
- <option name="PROJECT_PROFILE" />
4
- </settings>
5
- </component>
data/.idea/workspace.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="PropertiesComponent">
4
- <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
5
- <property name="nodejs_npm_path_reset_for_default_project" value="true" />
6
- <property name="settings.editor.selected.configurable" value="org.jetbrains.plugins.ruby.settings.RubyActiveModuleSdkConfigurable" />
7
- </component>
8
- </project>