git-trend 1.4.2 → 1.4.3

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.
data/spec/spec_helper.rb DELETED
@@ -1,114 +0,0 @@
1
- # This file was generated by the `rspec --init` 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
- require "simplecov"
18
- SimpleCov.start do
19
- add_filter "/spec/"
20
- end
21
-
22
- require "webmock/rspec"
23
- require "git_trend"
24
-
25
- RSpec.configure do |config|
26
- config.expect_with :rspec do |expectations|
27
- expectations.syntax = :expect
28
- end
29
-
30
- config.mock_with :rspec do |mocks|
31
- mocks.syntax = :expect
32
- mocks.verify_partial_doubles = true
33
- end
34
-
35
- config.filter_run :focus
36
- config.run_all_when_everything_filtered = true
37
- config.expose_dsl_globally = false
38
-
39
- config.example_status_persistence_file_path = "spec/examples.txt"
40
- config.order = :random
41
- Kernel.srand config.seed
42
- # The settings below are suggested to provide a good initial experience
43
- # with RSpec, but feel free to customize to your heart's content.
44
- =begin
45
- # These two settings work together to allow you to limit a spec run
46
- # to individual examples or groups you care about by tagging them with
47
- # `:focus` metadata. When nothing is tagged with `:focus`, all examples
48
- # get run.
49
- config.filter_run :focus
50
- config.run_all_when_everything_filtered = true
51
-
52
- # Many RSpec users commonly either run the entire suite or an individual
53
- # file, and it's useful to allow more verbose output when running an
54
- # individual spec file.
55
- if config.files_to_run.one?
56
- # Use the documentation formatter for detailed output,
57
- # unless a formatter has already been configured
58
- # (e.g. via a command-line flag).
59
- config.default_formatter = 'doc'
60
- end
61
-
62
- # Print the 10 slowest examples and example groups at the
63
- # end of the spec run, to help surface which specs are running
64
- # particularly slow.
65
- config.profile_examples = 10
66
-
67
- # Run specs in random order to surface order dependencies. If you find an
68
- # order dependency and want to debug it, you can fix the order by providing
69
- # the seed, which is printed after each run.
70
- # --seed 1234
71
- config.order = :random
72
-
73
- # Seed global randomization in this process using the `--seed` CLI option.
74
- # Setting this allows you to use `--seed` to deterministically reproduce
75
- # test failures related to randomization by passing the same `--seed` value
76
- # as the one that triggered the failure.
77
- Kernel.srand config.seed
78
-
79
- # rspec-expectations config goes here. You can use an alternate
80
- # assertion/expectation library such as wrong or the stdlib/minitest
81
- # assertions if you prefer.
82
- config.expect_with :rspec do |expectations|
83
- # Enable only the newer, non-monkey-patching expect syntax.
84
- # For more details, see:
85
- # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
86
- expectations.syntax = :expect
87
- end
88
-
89
- # rspec-mocks config goes here. You can use an alternate test double
90
- # library (such as bogus or mocha) by changing the `mock_with` option here.
91
- config.mock_with :rspec do |mocks|
92
- # Enable only the newer, non-monkey-patching expect syntax.
93
- # For more details, see:
94
- # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
95
- mocks.syntax = :expect
96
-
97
- # Prevents you from mocking or stubbing a method that does not exist on
98
- # a real object. This is generally recommended.
99
- mocks.verify_partial_doubles = true
100
- end
101
- =end
102
- end
103
-
104
- def load_http_stub(file_name)
105
- file_path = File.join(__dir__, "fixtures", file_name)
106
- file_path = File.join(file_path, "index") if File.directory? file_path
107
- File.read(file_path)
108
- end
109
-
110
- class String
111
- def unindent
112
- gsub(/^\s+\|/, "")
113
- end
114
- end