zapata 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.
Files changed (132) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.rspec +3 -0
  4. data/CONTRIBUTING.md +5 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE +22 -0
  7. data/README.md +152 -0
  8. data/Rakefile +2 -0
  9. data/bin/zapata +20 -0
  10. data/lib/zapata.rb +91 -0
  11. data/lib/zapata/analyst.rb +34 -0
  12. data/lib/zapata/core/collector.rb +9 -0
  13. data/lib/zapata/core/loader.rb +38 -0
  14. data/lib/zapata/core/reader.rb +10 -0
  15. data/lib/zapata/core/writer.rb +33 -0
  16. data/lib/zapata/db.rb +32 -0
  17. data/lib/zapata/diver.rb +81 -0
  18. data/lib/zapata/predictor/args.rb +94 -0
  19. data/lib/zapata/predictor/chooser.rb +27 -0
  20. data/lib/zapata/primitive/arg.rb +24 -0
  21. data/lib/zapata/primitive/array.rb +39 -0
  22. data/lib/zapata/primitive/base.rb +28 -0
  23. data/lib/zapata/primitive/basic.rb +22 -0
  24. data/lib/zapata/primitive/casgn.rb +15 -0
  25. data/lib/zapata/primitive/const.rb +15 -0
  26. data/lib/zapata/primitive/def.rb +33 -0
  27. data/lib/zapata/primitive/defs.rb +32 -0
  28. data/lib/zapata/primitive/hash.rb +31 -0
  29. data/lib/zapata/primitive/ivar.rb +6 -0
  30. data/lib/zapata/primitive/klass.rb +34 -0
  31. data/lib/zapata/primitive/lvar.rb +24 -0
  32. data/lib/zapata/primitive/missing.rb +17 -0
  33. data/lib/zapata/primitive/modul.rb +20 -0
  34. data/lib/zapata/primitive/nil.rb +16 -0
  35. data/lib/zapata/primitive/optarg.rb +18 -0
  36. data/lib/zapata/primitive/raw.rb +16 -0
  37. data/lib/zapata/primitive/send.rb +48 -0
  38. data/lib/zapata/primitive/sklass.rb +20 -0
  39. data/lib/zapata/primitive/var.rb +25 -0
  40. data/lib/zapata/printer.rb +93 -0
  41. data/lib/zapata/rzpec/runner.rb +67 -0
  42. data/lib/zapata/rzpec/writer.rb +115 -0
  43. data/lib/zapata/version.rb +3 -0
  44. data/spec/array_spec.rb +37 -0
  45. data/spec/definition_spec.rb +43 -0
  46. data/spec/hash_spec.rb +43 -0
  47. data/spec/klass_types_spec.rb +55 -0
  48. data/spec/send_spec.rb +31 -0
  49. data/spec/simple_types_spec.rb +90 -0
  50. data/spec/spec_helper.rb +124 -0
  51. data/spec/support/rails_test_app/.gitignore +16 -0
  52. data/spec/support/rails_test_app/.rspec +3 -0
  53. data/spec/support/rails_test_app/Gemfile +45 -0
  54. data/spec/support/rails_test_app/Gemfile.lock +200 -0
  55. data/spec/support/rails_test_app/README.md +3 -0
  56. data/spec/support/rails_test_app/Rakefile +6 -0
  57. data/spec/support/rails_test_app/app/assets/images/.keep +0 -0
  58. data/spec/support/rails_test_app/app/assets/javascripts/application.js +16 -0
  59. data/spec/support/rails_test_app/app/assets/stylesheets/application.css +15 -0
  60. data/spec/support/rails_test_app/app/controllers/application_controller.rb +5 -0
  61. data/spec/support/rails_test_app/app/controllers/concerns/.keep +0 -0
  62. data/spec/support/rails_test_app/app/helpers/application_helper.rb +2 -0
  63. data/spec/support/rails_test_app/app/mailers/.keep +0 -0
  64. data/spec/support/rails_test_app/app/models/.keep +0 -0
  65. data/spec/support/rails_test_app/app/models/concerns/.keep +0 -0
  66. data/spec/support/rails_test_app/app/models/robot_to_test.rb +49 -0
  67. data/spec/support/rails_test_app/app/models/test_array.rb +34 -0
  68. data/spec/support/rails_test_app/app/models/test_const.rb +14 -0
  69. data/spec/support/rails_test_app/app/models/test_definition.rb +38 -0
  70. data/spec/support/rails_test_app/app/models/test_float.rb +14 -0
  71. data/spec/support/rails_test_app/app/models/test_hash.rb +39 -0
  72. data/spec/support/rails_test_app/app/models/test_int.rb +14 -0
  73. data/spec/support/rails_test_app/app/models/test_send.rb +75 -0
  74. data/spec/support/rails_test_app/app/models/test_str.rb +14 -0
  75. data/spec/support/rails_test_app/app/models/test_sym.rb +14 -0
  76. data/spec/support/rails_test_app/app/models/testing_module/bare.rb +6 -0
  77. data/spec/support/rails_test_app/app/models/testing_module/klass_methods.rb +47 -0
  78. data/spec/support/rails_test_app/app/models/testing_module/nested/inside.rb +8 -0
  79. data/spec/support/rails_test_app/app/views/layouts/application.html.erb +14 -0
  80. data/spec/support/rails_test_app/config.ru +4 -0
  81. data/spec/support/rails_test_app/config/application.rb +23 -0
  82. data/spec/support/rails_test_app/config/boot.rb +4 -0
  83. data/spec/support/rails_test_app/config/database.yml +25 -0
  84. data/spec/support/rails_test_app/config/environment.rb +5 -0
  85. data/spec/support/rails_test_app/config/environments/development.rb +37 -0
  86. data/spec/support/rails_test_app/config/environments/production.rb +83 -0
  87. data/spec/support/rails_test_app/config/environments/test.rb +39 -0
  88. data/spec/support/rails_test_app/config/initializers/backtrace_silencers.rb +7 -0
  89. data/spec/support/rails_test_app/config/initializers/cookies_serializer.rb +3 -0
  90. data/spec/support/rails_test_app/config/initializers/filter_parameter_logging.rb +4 -0
  91. data/spec/support/rails_test_app/config/initializers/inflections.rb +16 -0
  92. data/spec/support/rails_test_app/config/initializers/mime_types.rb +4 -0
  93. data/spec/support/rails_test_app/config/initializers/session_store.rb +3 -0
  94. data/spec/support/rails_test_app/config/initializers/wrap_parameters.rb +14 -0
  95. data/spec/support/rails_test_app/config/locales/en.yml +23 -0
  96. data/spec/support/rails_test_app/config/routes.rb +56 -0
  97. data/spec/support/rails_test_app/config/secrets.yml +22 -0
  98. data/spec/support/rails_test_app/db/seeds.rb +7 -0
  99. data/spec/support/rails_test_app/lib/assets/.keep +0 -0
  100. data/spec/support/rails_test_app/lib/tasks/.keep +0 -0
  101. data/spec/support/rails_test_app/log/.keep +0 -0
  102. data/spec/support/rails_test_app/public/404.html +67 -0
  103. data/spec/support/rails_test_app/public/422.html +67 -0
  104. data/spec/support/rails_test_app/public/500.html +66 -0
  105. data/spec/support/rails_test_app/public/favicon.ico +0 -0
  106. data/spec/support/rails_test_app/public/robots.txt +5 -0
  107. data/spec/support/rails_test_app/spec/models/robot_to_test_spec.rb +33 -0
  108. data/spec/support/rails_test_app/spec/models/test_array_spec.rb +27 -0
  109. data/spec/support/rails_test_app/spec/models/test_const_spec.rb +11 -0
  110. data/spec/support/rails_test_app/spec/models/test_definition_spec.rb +31 -0
  111. data/spec/support/rails_test_app/spec/models/test_float_spec.rb +11 -0
  112. data/spec/support/rails_test_app/spec/models/test_hash_spec.rb +31 -0
  113. data/spec/support/rails_test_app/spec/models/test_int_spec.rb +11 -0
  114. data/spec/support/rails_test_app/spec/models/test_send_spec.rb +53 -0
  115. data/spec/support/rails_test_app/spec/models/test_str_spec.rb +11 -0
  116. data/spec/support/rails_test_app/spec/models/test_sym_spec.rb +11 -0
  117. data/spec/support/rails_test_app/spec/models/testing_module/bare_spec.rb +7 -0
  118. data/spec/support/rails_test_app/spec/models/testing_module/klass_methods_spec.rb +19 -0
  119. data/spec/support/rails_test_app/spec/models/testing_module/nested/inside_spec.rb +7 -0
  120. data/spec/support/rails_test_app/spec/rails_helper.rb +43 -0
  121. data/spec/support/rails_test_app/spec/spec_helper.rb +78 -0
  122. data/spec/support/rails_test_app/test/controllers/.keep +0 -0
  123. data/spec/support/rails_test_app/test/fixtures/.keep +0 -0
  124. data/spec/support/rails_test_app/test/helpers/.keep +0 -0
  125. data/spec/support/rails_test_app/test/integration/.keep +0 -0
  126. data/spec/support/rails_test_app/test/mailers/.keep +0 -0
  127. data/spec/support/rails_test_app/test/models/.keep +0 -0
  128. data/spec/support/rails_test_app/test/test_helper.rb +13 -0
  129. data/spec/support/rails_test_app/vendor/assets/javascripts/.keep +0 -0
  130. data/spec/support/rails_test_app/vendor/assets/stylesheets/.keep +0 -0
  131. data/zapata.gemspec +34 -0
  132. metadata +446 -0
@@ -0,0 +1,27 @@
1
+ require 'rails_helper'
2
+
3
+ describe TestArray do
4
+ let(:test_array) do
5
+ TestArray.new
6
+ end
7
+
8
+ it '#test_in_arg' do
9
+ expect(test_array.test_in_arg([2, 7.1, 8])).to eq([2, 7.1, 8])
10
+ end
11
+
12
+ it '#test_nested_one_level' do
13
+ expect(test_array.test_nested_one_level([[2, 7.1, 8], :mexico])).to eq([[2, 7.1, 8], :mexico])
14
+ end
15
+
16
+ it '#test_nested_two_levels' do
17
+ expect(test_array.test_nested_two_levels([[[2, 7.1, 8], :mexico], [2, 7.1, 8], :mexico])).to eq([[[2, 7.1, 8], :mexico], [2, 7.1, 8], :mexico])
18
+ end
19
+
20
+ it '#test_nested_three_levels' do
21
+ expect(test_array.test_nested_three_levels([[[[2, 7.1, 8], :mexico], [2, 7.1, 8], :mexico], [[2, 7.1, 8], :mexico], [2, 7.1, 8], :mexico])).to eq([[[[2, 7.1, 8], :mexico], [2, 7.1, 8], :mexico], [[2, 7.1, 8], :mexico], [2, 7.1, 8], :mexico])
22
+ end
23
+
24
+ it '#test_hash_nested' do
25
+ expect(test_array.test_hash_nested([{ emiliano: [2, 7.1, 8] }])).to eq([{ emiliano: [2, 7.1, 8] }])
26
+ end
27
+ end
@@ -0,0 +1,11 @@
1
+ require 'rails_helper'
2
+
3
+ describe TestConst do
4
+ let(:test_const) do
5
+ TestConst.new
6
+ end
7
+
8
+ it '#test_const_in_arg' do
9
+ expect(test_const.test_const_in_arg(TestConst)).to eq(TestConst)
10
+ end
11
+ end
@@ -0,0 +1,31 @@
1
+ require 'rails_helper'
2
+
3
+ describe TestDefinition do
4
+ let(:test_definition) do
5
+ TestDefinition.new
6
+ end
7
+
8
+ it '#in_optional_args' do
9
+ expect(test_definition.in_optional_args(:audioslave)).to eq(:audioslave)
10
+ end
11
+
12
+ it '#use_optional' do
13
+ expect(test_definition.use_optional(:audioslave)).to eq(:audioslave)
14
+ end
15
+
16
+ it '#var_in_optional_args' do
17
+ expect(test_definition.var_in_optional_args('Chuck')).to eq('Chuck')
18
+ end
19
+
20
+ it '#method_in_optional_args' do
21
+ expect(test_definition.method_in_optional_args('I am falling')).to eq('I am falling')
22
+ end
23
+
24
+ it '#call_method_result_in_optional_args' do
25
+ expect(test_definition.call_method_result_in_optional_args('Missing "complex_method"')).to eq('Missing "complex_method"')
26
+ end
27
+
28
+ it '#recursive_method' do
29
+ expect(test_definition.recursive_method).to eq('Exception in RSpec')
30
+ end
31
+ end
@@ -0,0 +1,11 @@
1
+ require 'rails_helper'
2
+
3
+ describe TestFloat do
4
+ let(:test_float) do
5
+ TestFloat.new
6
+ end
7
+
8
+ it '#test_float_in_arg' do
9
+ expect(test_float.test_float_in_arg(2.718)).to eq(2.718)
10
+ end
11
+ end
@@ -0,0 +1,31 @@
1
+ require 'rails_helper'
2
+
3
+ describe TestHash do
4
+ let(:test_hash) do
5
+ TestHash.new
6
+ end
7
+
8
+ it '#test_in_arg' do
9
+ expect(test_hash.test_in_arg({ 1 => :one, TestHash => 2.718 })).to eq({ 1 => :one, TestHash => 2.718 })
10
+ end
11
+
12
+ it '#test_nested_one_level' do
13
+ expect(test_hash.test_nested_one_level({ first_level: { 1 => :one, TestHash => 2.718 } })).to eq({ first_level: { 1 => :one, TestHash => 2.718 } })
14
+ end
15
+
16
+ it '#test_nested_two_levels' do
17
+ expect(test_hash.test_nested_two_levels({ second_level: { first_level: { 1 => :one, TestHash => 2.718 } } })).to eq({ second_level: { first_level: { 1 => :one, TestHash => 2.718 } } })
18
+ end
19
+
20
+ it '#test_nested_three_levels' do
21
+ expect(test_hash.test_nested_three_levels({ third_level: { second_level: { first_level: { 1 => :one, TestHash => 2.718 } } } })).to eq({ third_level: { second_level: { first_level: { 1 => :one, TestHash => 2.718 } } } })
22
+ end
23
+
24
+ it '#test_key_as_another_hash' do
25
+ expect(test_hash.test_key_as_another_hash({ { 1 => :one, TestHash => 2.718 } => :ratm })).to eq({ { 1 => :one, TestHash => 2.718 } => :ratm })
26
+ end
27
+
28
+ it '#test_keys_are_symbols' do
29
+ expect(test_hash.test_keys_are_symbols({ this: 'should', be: 'pretty' })).to eq({ this: 'should', be: 'pretty' })
30
+ end
31
+ end
@@ -0,0 +1,11 @@
1
+ require 'rails_helper'
2
+
3
+ describe TestInt do
4
+ let(:test_int) do
5
+ TestInt.new
6
+ end
7
+
8
+ it '#test_int_in_arg' do
9
+ expect(test_int.test_int_in_arg(1)).to eq(1)
10
+ end
11
+ end
@@ -0,0 +1,53 @@
1
+ require 'rails_helper'
2
+
3
+ describe TestSend do
4
+ let(:test_send) do
5
+ TestSend.new
6
+ end
7
+
8
+ it '#another_method_as_arg' do
9
+ expect(test_send.another_method_as_arg('Help method')).to eq('Help method')
10
+ end
11
+
12
+ it '#second_level_method_chain' do
13
+ expect(test_send.second_level_method_chain('Help method')).to eq('Help method')
14
+ end
15
+
16
+ it '#third_level_method_chain' do
17
+ expect(test_send.third_level_method_chain('Help method')).to eq('Help method')
18
+ end
19
+
20
+ it '#method_with_calculated_value' do
21
+ expect(test_send.method_with_calculated_value('Missing "calculated_value"')).to eq('Missing "calculated_value"')
22
+ end
23
+
24
+ it '#to_another_object' do
25
+ expect(test_send.to_another_object(AnotherObject.my_name)).to eq('Domas')
26
+ end
27
+
28
+ it '#to_another_object_with_params' do
29
+ expect(test_send.to_another_object_with_params(AnotherObject.send_with_params(12))).to eq('Id was 12')
30
+ end
31
+
32
+ it '#not_explicit_with_params' do
33
+ expect(test_send.not_explicit_with_params('Could you find it?')).to eq('Could you find it?')
34
+ end
35
+
36
+ it '#fail_to_understand' do
37
+ expect(test_send.fail_to_understand('Missing "failure"')).to eq('Missing "failure"')
38
+ end
39
+ end
40
+
41
+ describe AnotherObject do
42
+ let(:another_object) do
43
+ AnotherObject.new
44
+ end
45
+
46
+ it '#my_name' do
47
+ expect(AnotherObject.my_name).to eq('Domas')
48
+ end
49
+
50
+ it '#send_with_params' do
51
+ expect(AnotherObject.send_with_params('Missing "id"')).to eq('Id was Missing "id"')
52
+ end
53
+ end
@@ -0,0 +1,11 @@
1
+ require 'rails_helper'
2
+
3
+ describe TestStr do
4
+ let(:test_str) do
5
+ TestStr.new
6
+ end
7
+
8
+ it '#test_str_in_arg' do
9
+ expect(test_str.test_str_in_arg('audioslave')).to eq('audioslave')
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ require 'rails_helper'
2
+
3
+ describe TestSym do
4
+ let(:test_sym) do
5
+ TestSym.new
6
+ end
7
+
8
+ it '#test_sym_in_arg' do
9
+ expect(test_sym.test_sym_in_arg(:rock)).to eq(:rock)
10
+ end
11
+ end
@@ -0,0 +1,7 @@
1
+ require 'rails_helper'
2
+
3
+ describe TestingModule::Bare do
4
+ let(:bare) do
5
+ TestingModule::Bare.new
6
+ end
7
+ end
@@ -0,0 +1,19 @@
1
+ require 'rails_helper'
2
+
3
+ describe TestingModule::KlassMethods do
4
+ let(:klass_methods) do
5
+ TestingModule::KlassMethods.new
6
+ end
7
+
8
+ it '#defined_with_self' do
9
+ expect(TestingModule::KlassMethods.defined_with_self(5)).to eq(5)
10
+ end
11
+
12
+ it '#defined_with_back_back_self' do
13
+ expect(TestingModule::KlassMethods.defined_with_back_back_self(5)).to eq(5)
14
+ end
15
+
16
+ it '#back_to_public_defined_with_self' do
17
+ expect(TestingModule::KlassMethods.back_to_public_defined_with_self(5)).to eq(5)
18
+ end
19
+ end
@@ -0,0 +1,7 @@
1
+ require 'rails_helper'
2
+
3
+ describe TestingModule::Nested::Inside do
4
+ let(:inside) do
5
+ TestingModule::Nested::Inside.new
6
+ end
7
+ end
@@ -0,0 +1,43 @@
1
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
2
+ ENV["RAILS_ENV"] ||= 'test'
3
+ # require 'spec_helper'
4
+ require File.expand_path("../../config/environment", __FILE__)
5
+ require 'rspec/rails'
6
+
7
+ # Requires supporting ruby files with custom matchers and macros, etc, in
8
+ # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
9
+ # run as spec files by default. This means that files in spec/support that end
10
+ # in _spec.rb will both be required and run as specs, causing the specs to be
11
+ # run twice. It is recommended that you do not name files matching this glob to
12
+ # end with _spec.rb. You can configure this pattern with the --pattern
13
+ # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
14
+ Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
15
+
16
+ # Checks for pending migrations before tests are run.
17
+ # If you are not using ActiveRecord, you can remove this line.
18
+ ActiveRecord::Migration.maintain_test_schema!
19
+
20
+ RSpec.configure do |config|
21
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
22
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
23
+
24
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
25
+ # examples within a transaction, remove the following line or assign false
26
+ # instead of true.
27
+ config.use_transactional_fixtures = true
28
+
29
+ # RSpec Rails can automatically mix in different behaviours to your tests
30
+ # based on their file location, for example enabling you to call `get` and
31
+ # `post` in specs under `spec/controllers`.
32
+ #
33
+ # You can disable this behaviour by removing the line below, and instead
34
+ # explicitly tag your specs with their type, e.g.:
35
+ #
36
+ # RSpec.describe UsersController, :type => :controller do
37
+ # # ...
38
+ # end
39
+ #
40
+ # The different available types are documented in the features, such as in
41
+ # https://relishapp.com/rspec/rspec-rails/docs
42
+ config.infer_spec_type_from_file_location!
43
+ end
@@ -0,0 +1,78 @@
1
+ # This file was generated by the `rails generate rspec:install` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause this
4
+ # file to always be loaded, without a need to explicitly require it in any files.
5
+ #
6
+ # Given that it is always loaded, you are encouraged to keep this file as
7
+ # light-weight as possible. Requiring heavyweight dependencies from this file
8
+ # will add to the boot time of your test suite on EVERY test run, even for an
9
+ # individual file that may not need all of that loaded. Instead, make a
10
+ # separate helper file that requires this one and then use it only in the specs
11
+ # that actually need it.
12
+ #
13
+ # The `.rspec` file also contains a few flags that are not defaults but that
14
+ # users commonly want.
15
+ #
16
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17
+ RSpec.configure do |config|
18
+ # The settings below are suggested to provide a good initial experience
19
+ # with RSpec, but feel free to customize to your heart's content.
20
+ =begin
21
+ # These two settings work together to allow you to limit a spec run
22
+ # to individual examples or groups you care about by tagging them with
23
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
24
+ # get run.
25
+ config.filter_run :focus
26
+ config.run_all_when_everything_filtered = true
27
+
28
+ # Many RSpec users commonly either run the entire suite or an individual
29
+ # file, and it's useful to allow more verbose output when running an
30
+ # individual spec file.
31
+ if config.files_to_run.one?
32
+ # Use the documentation formatter for detailed output,
33
+ # unless a formatter has already been configured
34
+ # (e.g. via a command-line flag).
35
+ config.default_formatter = 'doc'
36
+ end
37
+
38
+ # Print the 10 slowest examples and example groups at the
39
+ # end of the spec run, to help surface which specs are running
40
+ # particularly slow.
41
+ config.profile_examples = 10
42
+
43
+ # Run specs in random order to surface order dependencies. If you find an
44
+ # order dependency and want to debug it, you can fix the order by providing
45
+ # the seed, which is printed after each run.
46
+ # --seed 1234
47
+ config.order = :random
48
+
49
+ # Seed global randomization in this process using the `--seed` CLI option.
50
+ # Setting this allows you to use `--seed` to deterministically reproduce
51
+ # test failures related to randomization by passing the same `--seed` value
52
+ # as the one that triggered the failure.
53
+ Kernel.srand config.seed
54
+
55
+ # rspec-expectations config goes here. You can use an alternate
56
+ # assertion/expectation library such as wrong or the stdlib/minitest
57
+ # assertions if you prefer.
58
+ config.expect_with :rspec do |expectations|
59
+ # Enable only the newer, non-monkey-patching expect syntax.
60
+ # For more details, see:
61
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
62
+ expectations.syntax = :expect
63
+ end
64
+
65
+ # rspec-mocks config goes here. You can use an alternate test double
66
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
67
+ config.mock_with :rspec do |mocks|
68
+ # Enable only the newer, non-monkey-patching expect syntax.
69
+ # For more details, see:
70
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
71
+ mocks.syntax = :expect
72
+
73
+ # Prevents you from mocking or stubbing a method that does not exist on
74
+ # a real object. This is generally recommended.
75
+ mocks.verify_partial_doubles = true
76
+ end
77
+ =end
78
+ end
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,13 @@
1
+ ENV['RAILS_ENV'] ||= 'test'
2
+ require File.expand_path('../../config/environment', __FILE__)
3
+ require 'rails/test_help'
4
+
5
+ class ActiveSupport::TestCase
6
+ # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
7
+ #
8
+ # Note: You'll currently still have to declare fixtures explicitly in integration tests
9
+ # -- they do not yet inherit this setting
10
+ fixtures :all
11
+
12
+ # Add more helper methods to be used by all tests here...
13
+ end
data/zapata.gemspec ADDED
@@ -0,0 +1,34 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'zapata/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'zapata'
8
+ spec.version = Zapata::VERSION
9
+ spec.authors = ['Domas Bitvinskas']
10
+ spec.email = ['domas.bitvinskas@me.com']
11
+ spec.summary = %q(Automatic automated test writer)
12
+ spec.description = %q(Who has time to write tests? This is a revolutional tool to make them write themselves.)
13
+ spec.homepage = 'https://github.com/Nedomas/zapata'
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = ['zapata']
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ['lib']
20
+
21
+ spec.add_runtime_dependency 'parser', '~> 2.1'
22
+ spec.add_runtime_dependency 'unparser', '~> 0.1'
23
+ spec.add_runtime_dependency 'andand', '~> 1.3'
24
+ spec.add_runtime_dependency 'pry', '~> 0.9'
25
+ spec.add_runtime_dependency 'pry-stack_explorer', '~> 0.4'
26
+ spec.add_runtime_dependency 'rails', '>=3.0.0'
27
+ spec.add_runtime_dependency 'slop', '~> 3.4'
28
+ spec.add_runtime_dependency 'rspec-rails', '~> 3.0'
29
+ spec.add_runtime_dependency 'require_all', '~> 1.3'
30
+ spec.add_runtime_dependency 'file-temp', '~> 1.2'
31
+ spec.add_development_dependency 'rspec', '~> 3.0'
32
+ spec.add_development_dependency 'bundler', '~> 1.6'
33
+ spec.add_development_dependency 'rake', '~> 10.0'
34
+ end