fixturama 0.1.0 → 0.5.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 +4 -4
- data/CHANGELOG.md +99 -0
- data/README.md +76 -4
- data/lib/fixturama.rb +48 -20
- data/lib/fixturama/changes.rb +72 -0
- data/lib/fixturama/changes/base.rb +28 -0
- data/lib/fixturama/changes/chain.rb +64 -0
- data/lib/fixturama/changes/chain/actions.rb +31 -0
- data/lib/fixturama/changes/chain/arguments.rb +59 -0
- data/lib/fixturama/changes/chain/raise_action.rb +43 -0
- data/lib/fixturama/changes/chain/return_action.rb +33 -0
- data/lib/fixturama/changes/const.rb +30 -0
- data/lib/fixturama/changes/env.rb +35 -0
- data/lib/fixturama/changes/request.rb +91 -0
- data/lib/fixturama/changes/request/response.rb +62 -0
- data/lib/fixturama/changes/request/responses.rb +22 -0
- data/lib/fixturama/changes/seed.rb +39 -0
- data/lib/fixturama/config.rb +5 -0
- data/lib/fixturama/fixture_error.rb +31 -0
- data/lib/fixturama/loader.rb +6 -2
- data/lib/fixturama/loader/context.rb +14 -5
- data/lib/fixturama/loader/value.rb +1 -0
- data/lib/fixturama/version.rb +4 -0
- metadata +85 -73
- data/.gitignore +0 -12
- data/.rspec +0 -2
- data/.rubocop.yml +0 -22
- data/.travis.yml +0 -17
- data/Gemfile +0 -9
- data/LICENSE.txt +0 -21
- data/Rakefile +0 -6
- data/fixturama.gemspec +0 -24
- data/lib/fixturama/seed.rb +0 -15
- data/lib/fixturama/stubs.rb +0 -79
- data/lib/fixturama/stubs/chain.rb +0 -90
- data/lib/fixturama/stubs/chain/actions.rb +0 -39
- data/lib/fixturama/stubs/chain/actions/raise.rb +0 -21
- data/lib/fixturama/stubs/chain/actions/return.rb +0 -23
- data/lib/fixturama/stubs/chain/arguments.rb +0 -86
- data/lib/fixturama/stubs/const.rb +0 -43
- data/lib/fixturama/stubs/request.rb +0 -98
- data/lib/fixturama/stubs/request/response.rb +0 -43
- data/lib/fixturama/stubs/request/responses.rb +0 -20
- data/lib/fixturama/utils.rb +0 -39
- data/spec/fixturama/load_fixture/_spec.rb +0 -53
- data/spec/fixturama/load_fixture/data.json +0 -5
- data/spec/fixturama/load_fixture/data.yaml +0 -3
- data/spec/fixturama/load_fixture/data.yml +0 -3
- data/spec/fixturama/seed_fixture/_spec.rb +0 -36
- data/spec/fixturama/seed_fixture/seed.yml +0 -16
- data/spec/fixturama/stub_fixture/_spec.rb +0 -120
- data/spec/fixturama/stub_fixture/stub.yml +0 -73
- data/spec/spec_helper.rb +0 -26
@@ -1,73 +0,0 @@
|
|
1
|
-
---
|
2
|
-
- class: Payment
|
3
|
-
chain:
|
4
|
-
- new
|
5
|
-
- pay
|
6
|
-
actions:
|
7
|
-
- return: -1
|
8
|
-
|
9
|
-
- class: Payment
|
10
|
-
chain:
|
11
|
-
- new
|
12
|
-
- pay
|
13
|
-
arguments:
|
14
|
-
- 0
|
15
|
-
actions:
|
16
|
-
- raise: ArgumentError
|
17
|
-
|
18
|
-
- class: Payment
|
19
|
-
chain:
|
20
|
-
- new
|
21
|
-
- pay
|
22
|
-
arguments:
|
23
|
-
- 1
|
24
|
-
actions:
|
25
|
-
- return: 8
|
26
|
-
|
27
|
-
- class: Payment
|
28
|
-
chain:
|
29
|
-
- new
|
30
|
-
- pay
|
31
|
-
arguments:
|
32
|
-
- 2
|
33
|
-
actions:
|
34
|
-
- return: 4
|
35
|
-
- return: 2
|
36
|
-
- return: 0
|
37
|
-
|
38
|
-
- object: Payment.itself
|
39
|
-
chain:
|
40
|
-
- new
|
41
|
-
- pay
|
42
|
-
arguments:
|
43
|
-
- 3
|
44
|
-
actions:
|
45
|
-
- return: 6
|
46
|
-
repeat: 2
|
47
|
-
- return: 0
|
48
|
-
|
49
|
-
- class: Payment
|
50
|
-
chain:
|
51
|
-
- new
|
52
|
-
- pay
|
53
|
-
arguments:
|
54
|
-
- 10
|
55
|
-
- :overdraft: true
|
56
|
-
actions:
|
57
|
-
- return: -5
|
58
|
-
|
59
|
-
- const: TIMEOUT
|
60
|
-
value: 10
|
61
|
-
|
62
|
-
- method: get
|
63
|
-
uri: www.example.com/foo
|
64
|
-
responses:
|
65
|
-
- body: foo
|
66
|
-
headers:
|
67
|
-
Content-Length: 3
|
68
|
-
|
69
|
-
- method: delete
|
70
|
-
uri: /example.com/foo/ # Regexp!
|
71
|
-
responses:
|
72
|
-
- status: 200
|
73
|
-
- status: 404 # for any request except for the first one
|
data/spec/spec_helper.rb
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
begin
|
2
|
-
require "pry"
|
3
|
-
rescue LoadError
|
4
|
-
nil
|
5
|
-
end
|
6
|
-
|
7
|
-
require "bundler/setup"
|
8
|
-
require "fixturama/rspec"
|
9
|
-
|
10
|
-
RSpec.configure do |config|
|
11
|
-
# Enable flags like --only-failures and --next-failure
|
12
|
-
config.example_status_persistence_file_path = ".rspec_status"
|
13
|
-
|
14
|
-
# Disable RSpec exposing methods globally on `Module` and `main`
|
15
|
-
config.disable_monkey_patching!
|
16
|
-
|
17
|
-
config.expect_with :rspec do |c|
|
18
|
-
c.syntax = :expect
|
19
|
-
end
|
20
|
-
|
21
|
-
config.around do |example|
|
22
|
-
module Test; end
|
23
|
-
example.run
|
24
|
-
Object.send(:remove_const, :Test)
|
25
|
-
end
|
26
|
-
end
|