restspec 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.editorconfig +21 -0
- data/.gitignore +23 -0
- data/.rspec +4 -0
- data/Gemfile +4 -0
- data/Guardfile +6 -0
- data/LICENSE.txt +22 -0
- data/README.md +188 -0
- data/ROADMAP.md +11 -0
- data/Rakefile +20 -0
- data/bin/restspec +54 -0
- data/bin/templates/Gemfile +3 -0
- data/bin/templates/custom_macros.rb +3 -0
- data/bin/templates/restspec_config.rb +10 -0
- data/bin/templates/spec_helper.rb +19 -0
- data/docs/endpoints.md +200 -0
- data/docs/helpers.md +40 -0
- data/docs/macros.md +140 -0
- data/docs/matchers.md +38 -0
- data/docs/schemas.md +28 -0
- data/docs/tutorial.md +477 -0
- data/docs/types.md +134 -0
- data/examples/store-api-tests/.rspec +3 -0
- data/examples/store-api-tests/Gemfile +4 -0
- data/examples/store-api-tests/Gemfile.lock +70 -0
- data/examples/store-api-tests/spec/api/category_spec.rb +23 -0
- data/examples/store-api-tests/spec/api/product_spec.rb +55 -0
- data/examples/store-api-tests/spec/api/restspec/endpoints.rb +39 -0
- data/examples/store-api-tests/spec/api/restspec/requirements.rb +0 -0
- data/examples/store-api-tests/spec/api/restspec/restspec_config.rb +6 -0
- data/examples/store-api-tests/spec/api/restspec/schemas.rb +11 -0
- data/examples/store-api-tests/spec/spec_helper.rb +19 -0
- data/examples/store-api-tests/spec/support/custom_macros.rb +3 -0
- data/examples/store-api-tests/spec/support/custom_matchers.rb +0 -0
- data/examples/store-api/.editorconfig +24 -0
- data/examples/store-api/.rbenv-vars.example +3 -0
- data/examples/store-api/.rspec +4 -0
- data/examples/store-api/.ruby-version +1 -0
- data/examples/store-api/Gemfile +58 -0
- data/examples/store-api/Gemfile.lock +216 -0
- data/examples/store-api/Guardfile +39 -0
- data/examples/store-api/README.md +1 -0
- data/examples/store-api/Rakefile +6 -0
- data/examples/store-api/app/assets/images/.keep +0 -0
- data/examples/store-api/app/assets/javascripts/application.js +16 -0
- data/examples/store-api/app/assets/javascripts/categories.js.coffee +3 -0
- data/examples/store-api/app/assets/javascripts/products.js.coffee +3 -0
- data/examples/store-api/app/assets/stylesheets/application.css +15 -0
- data/examples/store-api/app/assets/stylesheets/categories.css.scss +3 -0
- data/examples/store-api/app/assets/stylesheets/products.css.scss +3 -0
- data/examples/store-api/app/assets/stylesheets/scaffolds.css.scss +69 -0
- data/examples/store-api/app/controllers/application_controller.rb +5 -0
- data/examples/store-api/app/controllers/categories_controller.rb +74 -0
- data/examples/store-api/app/controllers/concerns/.keep +0 -0
- data/examples/store-api/app/controllers/products_controller.rb +74 -0
- data/examples/store-api/app/helpers/application_helper.rb +2 -0
- data/examples/store-api/app/helpers/categories_helper.rb +2 -0
- data/examples/store-api/app/helpers/products_helper.rb +2 -0
- data/examples/store-api/app/mailers/.keep +0 -0
- data/examples/store-api/app/models/.keep +0 -0
- data/examples/store-api/app/models/category.rb +2 -0
- data/examples/store-api/app/models/concerns/.keep +0 -0
- data/examples/store-api/app/models/product.rb +3 -0
- data/examples/store-api/app/views/categories/_form.html.erb +21 -0
- data/examples/store-api/app/views/categories/edit.html.erb +6 -0
- data/examples/store-api/app/views/categories/index.html.erb +25 -0
- data/examples/store-api/app/views/categories/index.json.jbuilder +4 -0
- data/examples/store-api/app/views/categories/new.html.erb +5 -0
- data/examples/store-api/app/views/categories/show.html.erb +9 -0
- data/examples/store-api/app/views/categories/show.json.jbuilder +1 -0
- data/examples/store-api/app/views/layouts/application.html.erb +14 -0
- data/examples/store-api/app/views/products/_form.html.erb +29 -0
- data/examples/store-api/app/views/products/edit.html.erb +6 -0
- data/examples/store-api/app/views/products/index.html.erb +29 -0
- data/examples/store-api/app/views/products/index.json.jbuilder +4 -0
- data/examples/store-api/app/views/products/new.html.erb +5 -0
- data/examples/store-api/app/views/products/show.html.erb +19 -0
- data/examples/store-api/app/views/products/show.json.jbuilder +6 -0
- data/examples/store-api/bin/bundle +3 -0
- data/examples/store-api/bin/guard +16 -0
- data/examples/store-api/bin/rails +8 -0
- data/examples/store-api/bin/rake +8 -0
- data/examples/store-api/bin/spring +18 -0
- data/examples/store-api/config.ru +4 -0
- data/examples/store-api/config/application.rb +30 -0
- data/examples/store-api/config/boot.rb +4 -0
- data/examples/store-api/config/database.yml +25 -0
- data/examples/store-api/config/environment.rb +5 -0
- data/examples/store-api/config/environments/development.rb +37 -0
- data/examples/store-api/config/environments/production.rb +78 -0
- data/examples/store-api/config/environments/test.rb +39 -0
- data/examples/store-api/config/initializers/assets.rb +8 -0
- data/examples/store-api/config/initializers/backtrace_silencers.rb +7 -0
- data/examples/store-api/config/initializers/cookies_serializer.rb +3 -0
- data/examples/store-api/config/initializers/filter_parameter_logging.rb +4 -0
- data/examples/store-api/config/initializers/inflections.rb +16 -0
- data/examples/store-api/config/initializers/mime_types.rb +4 -0
- data/examples/store-api/config/initializers/session_store.rb +3 -0
- data/examples/store-api/config/initializers/wrap_parameters.rb +14 -0
- data/examples/store-api/config/locales/en.yml +23 -0
- data/examples/store-api/config/routes.rb +59 -0
- data/examples/store-api/config/secrets.yml +22 -0
- data/examples/store-api/db/migrate/20141205154816_create_products.rb +11 -0
- data/examples/store-api/db/migrate/20141205171104_create_categories.rb +9 -0
- data/examples/store-api/db/migrate/20141205171140_add_category_id_to_products.rb +5 -0
- data/examples/store-api/db/schema.rb +31 -0
- data/examples/store-api/db/seeds.rb +7 -0
- data/examples/store-api/lib/assets/.keep +0 -0
- data/examples/store-api/lib/tasks/.keep +0 -0
- data/examples/store-api/log/.keep +0 -0
- data/examples/store-api/public/404.html +67 -0
- data/examples/store-api/public/422.html +67 -0
- data/examples/store-api/public/500.html +66 -0
- data/examples/store-api/public/favicon.ico +0 -0
- data/examples/store-api/public/robots.txt +5 -0
- data/examples/store-api/spec/controllers/categories_controller_spec.rb +159 -0
- data/examples/store-api/spec/controllers/products_controller_spec.rb +159 -0
- data/examples/store-api/spec/factories/categories.rb +6 -0
- data/examples/store-api/spec/factories/products.rb +8 -0
- data/examples/store-api/spec/helpers/categories_helper_spec.rb +15 -0
- data/examples/store-api/spec/helpers/products_helper_spec.rb +15 -0
- data/examples/store-api/spec/models/category_spec.rb +5 -0
- data/examples/store-api/spec/models/product_spec.rb +5 -0
- data/examples/store-api/spec/rails_helper.rb +50 -0
- data/examples/store-api/spec/requests/categories_spec.rb +10 -0
- data/examples/store-api/spec/requests/products_spec.rb +10 -0
- data/examples/store-api/spec/routing/categories_routing_spec.rb +35 -0
- data/examples/store-api/spec/routing/products_routing_spec.rb +35 -0
- data/examples/store-api/spec/spec_helper.rb +85 -0
- data/examples/store-api/spec/views/categories/edit.html.erb_spec.rb +18 -0
- data/examples/store-api/spec/views/categories/index.html.erb_spec.rb +19 -0
- data/examples/store-api/spec/views/categories/new.html.erb_spec.rb +18 -0
- data/examples/store-api/spec/views/categories/show.html.erb_spec.rb +14 -0
- data/examples/store-api/spec/views/products/edit.html.erb_spec.rb +24 -0
- data/examples/store-api/spec/views/products/index.html.erb_spec.rb +25 -0
- data/examples/store-api/spec/views/products/new.html.erb_spec.rb +24 -0
- data/examples/store-api/spec/views/products/show.html.erb_spec.rb +18 -0
- data/examples/store-api/vendor/assets/javascripts/.keep +0 -0
- data/examples/store-api/vendor/assets/stylesheets/.keep +0 -0
- data/lib/restspec.rb +38 -0
- data/lib/restspec/configuration.rb +43 -0
- data/lib/restspec/endpoints/dsl.rb +142 -0
- data/lib/restspec/endpoints/endpoint.rb +135 -0
- data/lib/restspec/endpoints/namespace.rb +89 -0
- data/lib/restspec/endpoints/network.rb +39 -0
- data/lib/restspec/endpoints/request.rb +11 -0
- data/lib/restspec/endpoints/response.rb +53 -0
- data/lib/restspec/requirements/dsl.rb +10 -0
- data/lib/restspec/requirements/requirement.rb +59 -0
- data/lib/restspec/rspec/api_helpers.rb +64 -0
- data/lib/restspec/rspec/api_macros.rb +126 -0
- data/lib/restspec/rspec/extras.rb +2 -0
- data/lib/restspec/rspec/matchers/api_matchers.rb +6 -0
- data/lib/restspec/rspec/matchers/be_like_schema.rb +18 -0
- data/lib/restspec/rspec/matchers/be_like_schema_array.rb +18 -0
- data/lib/restspec/rspec/matchers/have_header.rb +47 -0
- data/lib/restspec/rspec/matchers/have_status.rb +17 -0
- data/lib/restspec/rspec/matchers/include_where.rb +14 -0
- data/lib/restspec/rspec/shared_examples.rb +12 -0
- data/lib/restspec/schema/attribute.rb +31 -0
- data/lib/restspec/schema/attribute_example.rb +21 -0
- data/lib/restspec/schema/checker.rb +73 -0
- data/lib/restspec/schema/dsl.rb +36 -0
- data/lib/restspec/schema/schema.rb +21 -0
- data/lib/restspec/schema/schema_example.rb +28 -0
- data/lib/restspec/schema/types.rb +35 -0
- data/lib/restspec/schema/types/array_type.rb +34 -0
- data/lib/restspec/schema/types/basic_type.rb +35 -0
- data/lib/restspec/schema/types/boolean_type.rb +11 -0
- data/lib/restspec/schema/types/decimal_string_type.rb +32 -0
- data/lib/restspec/schema/types/decimal_type.rb +14 -0
- data/lib/restspec/schema/types/embedded_schema_type.rb +28 -0
- data/lib/restspec/schema/types/hash_type.rb +25 -0
- data/lib/restspec/schema/types/integer_type.rb +11 -0
- data/lib/restspec/schema/types/null_type.rb +11 -0
- data/lib/restspec/schema/types/one_of_type.rb +21 -0
- data/lib/restspec/schema/types/schema_id_type.rb +88 -0
- data/lib/restspec/schema/types/string_type.rb +11 -0
- data/lib/restspec/shortcuts.rb +8 -0
- data/lib/restspec/stores/endpoint_store.rb +25 -0
- data/lib/restspec/stores/namespace_store.rb +20 -0
- data/lib/restspec/stores/schema_store.rb +19 -0
- data/lib/restspec/values/status_code.rb +13 -0
- data/lib/restspec/values/super_hash.rb +12 -0
- data/lib/restspec/version.rb +3 -0
- data/restspec.gemspec +37 -0
- data/spec/restspec/endpoints/dsl_spec.rb +269 -0
- data/spec/restspec/endpoints/endpoint_spec.rb +146 -0
- data/spec/restspec/endpoints/namespace_spec.rb +143 -0
- data/spec/restspec/endpoints/response_spec.rb +49 -0
- data/spec/restspec/schema/attribute_example_spec.rb +35 -0
- data/spec/restspec/schema/dsl_spec.rb +78 -0
- data/spec/restspec/schema/schema_example_spec.rb +40 -0
- data/spec/restspec/schema/schema_spec.rb +11 -0
- data/spec/restspec/schema/types/array_type_spec.rb +56 -0
- data/spec/restspec/schema/types/basic_type_spec.rb +62 -0
- data/spec/restspec/schema/types/boolean_type_spec.rb +26 -0
- data/spec/restspec/schema/types/null_type_spec.rb +25 -0
- data/spec/restspec/schema/types/string_type_spec.rb +26 -0
- data/spec/restspec/values/status_code_spec.rb +13 -0
- data/spec/spec_helper.rb +23 -0
- metadata +484 -0
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
include Restspec::Schema
|
4
|
+
|
5
|
+
describe SchemaExample do
|
6
|
+
let(:schema) { Schema.new(:name) }
|
7
|
+
let(:hidden_type) { double(example_for: 'hidden') }
|
8
|
+
let(:string_type) { double(example_for: 'name') }
|
9
|
+
let(:integer_type) { double(example_for: 18) }
|
10
|
+
|
11
|
+
subject { schema_example.value }
|
12
|
+
|
13
|
+
before do
|
14
|
+
schema.attributes['name'] = Attribute.new(:name, string_type)
|
15
|
+
schema.attributes['age'] = Attribute.new(:age, integer_type)
|
16
|
+
end
|
17
|
+
|
18
|
+
context 'without extensions' do
|
19
|
+
let(:schema_example) { SchemaExample.new(schema) }
|
20
|
+
|
21
|
+
it { should eq(name: 'name', age: 18)}
|
22
|
+
|
23
|
+
context 'with an attribute not allowed to generate examples' do
|
24
|
+
before do
|
25
|
+
schema.attributes['hidden'] = Attribute.new(:hidden, hidden_type, :for => [:checks])
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'does not include the hidden attribute' do
|
29
|
+
expect(subject).to_not include(:hidden)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
context 'with extensions' do
|
35
|
+
let(:extensions) { Hash[age: 21] }
|
36
|
+
let(:schema_example) { SchemaExample.new(schema, extensions) }
|
37
|
+
|
38
|
+
it { should eq(name: 'name', age: 21) }
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Restspec::Schema::Schema do
|
4
|
+
Schema = Restspec::Schema::Schema
|
5
|
+
|
6
|
+
it 'is only a bag for name and attributes that by default is a hash' do
|
7
|
+
person_schema = Schema.new(:person)
|
8
|
+
expect(person_schema.attributes).to eq({})
|
9
|
+
expect(person_schema.name).to eq(:person)
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
include Restspec::Schema::Types
|
4
|
+
|
5
|
+
describe ArrayType do
|
6
|
+
let(:type) { ArrayType.new }
|
7
|
+
let(:attribute) { double }
|
8
|
+
|
9
|
+
describe '#example_for' do
|
10
|
+
it 'returns an empty array' do
|
11
|
+
expect(type.example_for(attribute)).to eq([])
|
12
|
+
end
|
13
|
+
|
14
|
+
context 'with the example option: length' do
|
15
|
+
let(:type) { ArrayType.new(example_options: { length: 3 }) }
|
16
|
+
|
17
|
+
it 'raises an error asking for a parameterized type' do
|
18
|
+
expect { type.example_for(attribute) }.to raise_error
|
19
|
+
end
|
20
|
+
|
21
|
+
context 'with a parameterized type' do
|
22
|
+
let(:type) { ArrayType.new(example_options: { length: 3 }).of(StringType.new) }
|
23
|
+
let(:parameterized_type) { StringType.new }
|
24
|
+
|
25
|
+
it 'returns an array of that length with elements of that type' do
|
26
|
+
array = type.example_for(attribute)
|
27
|
+
expect(array.size).to eq(3)
|
28
|
+
|
29
|
+
array.each do |item|
|
30
|
+
expect(parameterized_type.valid?(attribute, item)).to eq(true)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
describe '#valid?' do
|
38
|
+
it 'validates that the value is an array' do
|
39
|
+
expect(type.valid?(attribute, [1, 2, 3])).to eq(true)
|
40
|
+
expect(type.valid?(attribute, {})).to eq(false)
|
41
|
+
expect(type.valid?(attribute, nil)).to eq(false)
|
42
|
+
expect(type.valid?(attribute, "string")).to eq(false)
|
43
|
+
end
|
44
|
+
|
45
|
+
context 'with a parameterized type' do
|
46
|
+
let(:type) { ArrayType.new.of(StringType.new) }
|
47
|
+
|
48
|
+
it 'validates arrays of the parameterized type' do
|
49
|
+
expect(type.valid?(attribute, [1, 2, 3])).to eq(false)
|
50
|
+
expect(type.valid?(attribute, [])).to eq(true)
|
51
|
+
expect(type.valid?(attribute, ['hola', 'mundo'])).to eq(true)
|
52
|
+
expect(type.valid?(attribute, ['hola', 1])).to eq(false)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
include Restspec::Schema::Types
|
4
|
+
|
5
|
+
describe BasicType do
|
6
|
+
let(:subclass) do
|
7
|
+
Class.new(BasicType) do
|
8
|
+
def valid?(attribute, value); true; end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
let(:type) { subclass.new }
|
13
|
+
let(:attribute) { double }
|
14
|
+
let(:value) { double }
|
15
|
+
|
16
|
+
describe '|' do
|
17
|
+
let(:other_type) { subclass.new }
|
18
|
+
|
19
|
+
before do
|
20
|
+
type | other_type
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'makes totally_valid? to answer true if the type is valid' do
|
24
|
+
allow(type).to receive(:valid?).and_return(true)
|
25
|
+
expect(type.totally_valid?(attribute, value)).to eq(true)
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'makes totally_valid? to answer true if the type is invalid but the other is valid' do
|
29
|
+
allow(type).to receive(:valid?).and_return(false)
|
30
|
+
allow(other_type).to receive(:valid?).and_return(true)
|
31
|
+
expect(type.totally_valid?(attribute, value)).to eq(true)
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'makes totally_valid? to answer false if both of them are invalid' do
|
35
|
+
allow(type).to receive(:valid?).and_return(false)
|
36
|
+
allow(other_type).to receive(:valid?).and_return(false)
|
37
|
+
expect(type.totally_valid?(attribute, value)).to eq(false)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'of' do
|
42
|
+
let(:other_type) { subclass.new }
|
43
|
+
|
44
|
+
let(:subclass) do
|
45
|
+
Class.new(BasicType) do
|
46
|
+
def valid?(attribute, value)
|
47
|
+
parameterized_type.valid?('attribute', 'value')
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
before do
|
53
|
+
type.of(other_type)
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'makes valid? to use the other type as his parameterized_type' do
|
57
|
+
allow(other_type).to receive(:valid?).and_return(true)
|
58
|
+
type.valid?(attribute, value)
|
59
|
+
expect(other_type).to have_received(:valid?).with('attribute', 'value')
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
include Restspec::Schema::Types
|
4
|
+
|
5
|
+
describe BooleanType do
|
6
|
+
let(:type) { BooleanType.new }
|
7
|
+
let(:attribute) { double }
|
8
|
+
|
9
|
+
describe '#example_for' do
|
10
|
+
it 'returns true or false' do
|
11
|
+
expect([true, false]).to include(type.example_for(attribute))
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe '#valid?' do
|
16
|
+
it 'only validates boolean values' do
|
17
|
+
expect(type.valid?(attribute, true)).to eq(true)
|
18
|
+
expect(type.valid?(attribute, false)).to eq(true)
|
19
|
+
expect(type.valid?(attribute, 'true')).to eq(false)
|
20
|
+
expect(type.valid?(attribute, '1')).to eq(false)
|
21
|
+
expect(type.valid?(attribute, 'on')).to eq(false)
|
22
|
+
expect(type.valid?(attribute, 'yes')).to eq(false)
|
23
|
+
expect(type.valid?(attribute, 1)).to eq(false)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
include Restspec::Schema::Types
|
4
|
+
|
5
|
+
describe NullType do
|
6
|
+
describe '#example_for' do
|
7
|
+
subject { NullType.new.example_for(double) }
|
8
|
+
|
9
|
+
it { should eq(nil) }
|
10
|
+
end
|
11
|
+
|
12
|
+
describe 'valid?' do
|
13
|
+
let(:type) { NullType.new }
|
14
|
+
|
15
|
+
it 'only is true when nil' do
|
16
|
+
expect(type.valid?(double, nil)).to eq(true)
|
17
|
+
expect(type.valid?(double, false)).to eq(false)
|
18
|
+
expect(type.valid?(double, '')).to eq(false)
|
19
|
+
expect(type.valid?(double, 'hola')).to eq(false)
|
20
|
+
expect(type.valid?(double, 'null')).to eq(false)
|
21
|
+
expect(type.valid?(double, 0)).to eq(false)
|
22
|
+
expect(type.valid?(double, 1)).to eq(false)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
include Restspec::Schema::Types
|
4
|
+
|
5
|
+
describe StringType do
|
6
|
+
let(:attribute) { double }
|
7
|
+
let(:type) { StringType.new }
|
8
|
+
|
9
|
+
describe '#valid?' do
|
10
|
+
it 'only allows strings' do
|
11
|
+
expect(type.valid?(attribute, true)).to eq(false)
|
12
|
+
expect(type.valid?(attribute, false)).to eq(false)
|
13
|
+
expect(type.valid?(attribute, 1)).to eq(false)
|
14
|
+
expect(type.valid?(attribute, 1.5)).to eq(false)
|
15
|
+
expect(type.valid?(attribute, 'string')).to eq(true)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe '#example_for' do
|
20
|
+
it 'generates a string' do
|
21
|
+
10.times.map {
|
22
|
+
expect(type.example_for(attribute)).to be_kind_of(String)
|
23
|
+
}
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Restspec::Values::StatusCode do
|
4
|
+
describe '#value' do
|
5
|
+
it 'maps a string to a code' do
|
6
|
+
expect(described_class.new(:ok).value).to eq(200)
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'just return the same code' do
|
10
|
+
expect(described_class.new(200).value).to eq(200)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Dir["#{File.dirname __FILE__}/support/**/*.rb"].each {|f| require f}
|
2
|
+
|
3
|
+
require 'simplecov'
|
4
|
+
|
5
|
+
SimpleCov.start do
|
6
|
+
add_filter '/spec/'
|
7
|
+
add_filter '/docs/'
|
8
|
+
add_filter '/pkg/'
|
9
|
+
add_filter '/examples/'
|
10
|
+
add_filter '/lib/restspec/rspec'
|
11
|
+
end
|
12
|
+
|
13
|
+
require 'restspec'
|
14
|
+
|
15
|
+
RSpec.configure do |config|
|
16
|
+
config.expect_with :rspec do |expectations|
|
17
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
18
|
+
end
|
19
|
+
|
20
|
+
config.mock_with :rspec do |mocks|
|
21
|
+
mocks.verify_partial_doubles = true
|
22
|
+
end
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,484 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: restspec
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- juliogarciag
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-12-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: pry
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.10'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.10'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: guard
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.8'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.8'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: guard-rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '4.3'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '4.3'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec-nc
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.2'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.2'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.9.1
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.9.1
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: activesupport
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '4.0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '4.0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: faker
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1.4'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1.4'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: hashie
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '3.3'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '3.3'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rack
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '1.0'
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '1.0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: rspec
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '3.0'
|
174
|
+
type: :runtime
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '3.0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: httparty
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0.13'
|
188
|
+
type: :runtime
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0.13'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: rspec-its
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '1.0'
|
202
|
+
type: :runtime
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - "~>"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '1.0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: rspec-collection_matchers
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - "~>"
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '1.0'
|
216
|
+
type: :runtime
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - "~>"
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '1.0'
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: thor
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - "~>"
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0.19'
|
230
|
+
type: :runtime
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - "~>"
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '0.19'
|
237
|
+
description: RSpec macros, helpers and matchers to work with APIs
|
238
|
+
email:
|
239
|
+
- julioggonz@gmail.com
|
240
|
+
executables:
|
241
|
+
- restspec
|
242
|
+
extensions: []
|
243
|
+
extra_rdoc_files: []
|
244
|
+
files:
|
245
|
+
- ".editorconfig"
|
246
|
+
- ".gitignore"
|
247
|
+
- ".rspec"
|
248
|
+
- Gemfile
|
249
|
+
- Guardfile
|
250
|
+
- LICENSE.txt
|
251
|
+
- README.md
|
252
|
+
- ROADMAP.md
|
253
|
+
- Rakefile
|
254
|
+
- bin/restspec
|
255
|
+
- bin/templates/Gemfile
|
256
|
+
- bin/templates/custom_macros.rb
|
257
|
+
- bin/templates/restspec_config.rb
|
258
|
+
- bin/templates/spec_helper.rb
|
259
|
+
- docs/endpoints.md
|
260
|
+
- docs/helpers.md
|
261
|
+
- docs/macros.md
|
262
|
+
- docs/matchers.md
|
263
|
+
- docs/schemas.md
|
264
|
+
- docs/tutorial.md
|
265
|
+
- docs/types.md
|
266
|
+
- examples/store-api-tests/.rspec
|
267
|
+
- examples/store-api-tests/Gemfile
|
268
|
+
- examples/store-api-tests/Gemfile.lock
|
269
|
+
- examples/store-api-tests/spec/api/category_spec.rb
|
270
|
+
- examples/store-api-tests/spec/api/product_spec.rb
|
271
|
+
- examples/store-api-tests/spec/api/restspec/endpoints.rb
|
272
|
+
- examples/store-api-tests/spec/api/restspec/requirements.rb
|
273
|
+
- examples/store-api-tests/spec/api/restspec/restspec_config.rb
|
274
|
+
- examples/store-api-tests/spec/api/restspec/schemas.rb
|
275
|
+
- examples/store-api-tests/spec/spec_helper.rb
|
276
|
+
- examples/store-api-tests/spec/support/custom_macros.rb
|
277
|
+
- examples/store-api-tests/spec/support/custom_matchers.rb
|
278
|
+
- examples/store-api/.editorconfig
|
279
|
+
- examples/store-api/.rbenv-vars.example
|
280
|
+
- examples/store-api/.rspec
|
281
|
+
- examples/store-api/.ruby-version
|
282
|
+
- examples/store-api/Gemfile
|
283
|
+
- examples/store-api/Gemfile.lock
|
284
|
+
- examples/store-api/Guardfile
|
285
|
+
- examples/store-api/README.md
|
286
|
+
- examples/store-api/Rakefile
|
287
|
+
- examples/store-api/app/assets/images/.keep
|
288
|
+
- examples/store-api/app/assets/javascripts/application.js
|
289
|
+
- examples/store-api/app/assets/javascripts/categories.js.coffee
|
290
|
+
- examples/store-api/app/assets/javascripts/products.js.coffee
|
291
|
+
- examples/store-api/app/assets/stylesheets/application.css
|
292
|
+
- examples/store-api/app/assets/stylesheets/categories.css.scss
|
293
|
+
- examples/store-api/app/assets/stylesheets/products.css.scss
|
294
|
+
- examples/store-api/app/assets/stylesheets/scaffolds.css.scss
|
295
|
+
- examples/store-api/app/controllers/application_controller.rb
|
296
|
+
- examples/store-api/app/controllers/categories_controller.rb
|
297
|
+
- examples/store-api/app/controllers/concerns/.keep
|
298
|
+
- examples/store-api/app/controllers/products_controller.rb
|
299
|
+
- examples/store-api/app/helpers/application_helper.rb
|
300
|
+
- examples/store-api/app/helpers/categories_helper.rb
|
301
|
+
- examples/store-api/app/helpers/products_helper.rb
|
302
|
+
- examples/store-api/app/mailers/.keep
|
303
|
+
- examples/store-api/app/models/.keep
|
304
|
+
- examples/store-api/app/models/category.rb
|
305
|
+
- examples/store-api/app/models/concerns/.keep
|
306
|
+
- examples/store-api/app/models/product.rb
|
307
|
+
- examples/store-api/app/views/categories/_form.html.erb
|
308
|
+
- examples/store-api/app/views/categories/edit.html.erb
|
309
|
+
- examples/store-api/app/views/categories/index.html.erb
|
310
|
+
- examples/store-api/app/views/categories/index.json.jbuilder
|
311
|
+
- examples/store-api/app/views/categories/new.html.erb
|
312
|
+
- examples/store-api/app/views/categories/show.html.erb
|
313
|
+
- examples/store-api/app/views/categories/show.json.jbuilder
|
314
|
+
- examples/store-api/app/views/layouts/application.html.erb
|
315
|
+
- examples/store-api/app/views/products/_form.html.erb
|
316
|
+
- examples/store-api/app/views/products/edit.html.erb
|
317
|
+
- examples/store-api/app/views/products/index.html.erb
|
318
|
+
- examples/store-api/app/views/products/index.json.jbuilder
|
319
|
+
- examples/store-api/app/views/products/new.html.erb
|
320
|
+
- examples/store-api/app/views/products/show.html.erb
|
321
|
+
- examples/store-api/app/views/products/show.json.jbuilder
|
322
|
+
- examples/store-api/bin/bundle
|
323
|
+
- examples/store-api/bin/guard
|
324
|
+
- examples/store-api/bin/rails
|
325
|
+
- examples/store-api/bin/rake
|
326
|
+
- examples/store-api/bin/spring
|
327
|
+
- examples/store-api/config.ru
|
328
|
+
- examples/store-api/config/application.rb
|
329
|
+
- examples/store-api/config/boot.rb
|
330
|
+
- examples/store-api/config/database.yml
|
331
|
+
- examples/store-api/config/environment.rb
|
332
|
+
- examples/store-api/config/environments/development.rb
|
333
|
+
- examples/store-api/config/environments/production.rb
|
334
|
+
- examples/store-api/config/environments/test.rb
|
335
|
+
- examples/store-api/config/initializers/assets.rb
|
336
|
+
- examples/store-api/config/initializers/backtrace_silencers.rb
|
337
|
+
- examples/store-api/config/initializers/cookies_serializer.rb
|
338
|
+
- examples/store-api/config/initializers/filter_parameter_logging.rb
|
339
|
+
- examples/store-api/config/initializers/inflections.rb
|
340
|
+
- examples/store-api/config/initializers/mime_types.rb
|
341
|
+
- examples/store-api/config/initializers/session_store.rb
|
342
|
+
- examples/store-api/config/initializers/wrap_parameters.rb
|
343
|
+
- examples/store-api/config/locales/en.yml
|
344
|
+
- examples/store-api/config/routes.rb
|
345
|
+
- examples/store-api/config/secrets.yml
|
346
|
+
- examples/store-api/db/migrate/20141205154816_create_products.rb
|
347
|
+
- examples/store-api/db/migrate/20141205171104_create_categories.rb
|
348
|
+
- examples/store-api/db/migrate/20141205171140_add_category_id_to_products.rb
|
349
|
+
- examples/store-api/db/schema.rb
|
350
|
+
- examples/store-api/db/seeds.rb
|
351
|
+
- examples/store-api/lib/assets/.keep
|
352
|
+
- examples/store-api/lib/tasks/.keep
|
353
|
+
- examples/store-api/log/.keep
|
354
|
+
- examples/store-api/public/404.html
|
355
|
+
- examples/store-api/public/422.html
|
356
|
+
- examples/store-api/public/500.html
|
357
|
+
- examples/store-api/public/favicon.ico
|
358
|
+
- examples/store-api/public/robots.txt
|
359
|
+
- examples/store-api/spec/controllers/categories_controller_spec.rb
|
360
|
+
- examples/store-api/spec/controllers/products_controller_spec.rb
|
361
|
+
- examples/store-api/spec/factories/categories.rb
|
362
|
+
- examples/store-api/spec/factories/products.rb
|
363
|
+
- examples/store-api/spec/helpers/categories_helper_spec.rb
|
364
|
+
- examples/store-api/spec/helpers/products_helper_spec.rb
|
365
|
+
- examples/store-api/spec/models/category_spec.rb
|
366
|
+
- examples/store-api/spec/models/product_spec.rb
|
367
|
+
- examples/store-api/spec/rails_helper.rb
|
368
|
+
- examples/store-api/spec/requests/categories_spec.rb
|
369
|
+
- examples/store-api/spec/requests/products_spec.rb
|
370
|
+
- examples/store-api/spec/routing/categories_routing_spec.rb
|
371
|
+
- examples/store-api/spec/routing/products_routing_spec.rb
|
372
|
+
- examples/store-api/spec/spec_helper.rb
|
373
|
+
- examples/store-api/spec/views/categories/edit.html.erb_spec.rb
|
374
|
+
- examples/store-api/spec/views/categories/index.html.erb_spec.rb
|
375
|
+
- examples/store-api/spec/views/categories/new.html.erb_spec.rb
|
376
|
+
- examples/store-api/spec/views/categories/show.html.erb_spec.rb
|
377
|
+
- examples/store-api/spec/views/products/edit.html.erb_spec.rb
|
378
|
+
- examples/store-api/spec/views/products/index.html.erb_spec.rb
|
379
|
+
- examples/store-api/spec/views/products/new.html.erb_spec.rb
|
380
|
+
- examples/store-api/spec/views/products/show.html.erb_spec.rb
|
381
|
+
- examples/store-api/vendor/assets/javascripts/.keep
|
382
|
+
- examples/store-api/vendor/assets/stylesheets/.keep
|
383
|
+
- lib/restspec.rb
|
384
|
+
- lib/restspec/configuration.rb
|
385
|
+
- lib/restspec/endpoints/dsl.rb
|
386
|
+
- lib/restspec/endpoints/endpoint.rb
|
387
|
+
- lib/restspec/endpoints/namespace.rb
|
388
|
+
- lib/restspec/endpoints/network.rb
|
389
|
+
- lib/restspec/endpoints/request.rb
|
390
|
+
- lib/restspec/endpoints/response.rb
|
391
|
+
- lib/restspec/requirements/dsl.rb
|
392
|
+
- lib/restspec/requirements/requirement.rb
|
393
|
+
- lib/restspec/rspec/api_helpers.rb
|
394
|
+
- lib/restspec/rspec/api_macros.rb
|
395
|
+
- lib/restspec/rspec/extras.rb
|
396
|
+
- lib/restspec/rspec/matchers/api_matchers.rb
|
397
|
+
- lib/restspec/rspec/matchers/be_like_schema.rb
|
398
|
+
- lib/restspec/rspec/matchers/be_like_schema_array.rb
|
399
|
+
- lib/restspec/rspec/matchers/have_header.rb
|
400
|
+
- lib/restspec/rspec/matchers/have_status.rb
|
401
|
+
- lib/restspec/rspec/matchers/include_where.rb
|
402
|
+
- lib/restspec/rspec/shared_examples.rb
|
403
|
+
- lib/restspec/schema/attribute.rb
|
404
|
+
- lib/restspec/schema/attribute_example.rb
|
405
|
+
- lib/restspec/schema/checker.rb
|
406
|
+
- lib/restspec/schema/dsl.rb
|
407
|
+
- lib/restspec/schema/schema.rb
|
408
|
+
- lib/restspec/schema/schema_example.rb
|
409
|
+
- lib/restspec/schema/types.rb
|
410
|
+
- lib/restspec/schema/types/array_type.rb
|
411
|
+
- lib/restspec/schema/types/basic_type.rb
|
412
|
+
- lib/restspec/schema/types/boolean_type.rb
|
413
|
+
- lib/restspec/schema/types/decimal_string_type.rb
|
414
|
+
- lib/restspec/schema/types/decimal_type.rb
|
415
|
+
- lib/restspec/schema/types/embedded_schema_type.rb
|
416
|
+
- lib/restspec/schema/types/hash_type.rb
|
417
|
+
- lib/restspec/schema/types/integer_type.rb
|
418
|
+
- lib/restspec/schema/types/null_type.rb
|
419
|
+
- lib/restspec/schema/types/one_of_type.rb
|
420
|
+
- lib/restspec/schema/types/schema_id_type.rb
|
421
|
+
- lib/restspec/schema/types/string_type.rb
|
422
|
+
- lib/restspec/shortcuts.rb
|
423
|
+
- lib/restspec/stores/endpoint_store.rb
|
424
|
+
- lib/restspec/stores/namespace_store.rb
|
425
|
+
- lib/restspec/stores/schema_store.rb
|
426
|
+
- lib/restspec/values/status_code.rb
|
427
|
+
- lib/restspec/values/super_hash.rb
|
428
|
+
- lib/restspec/version.rb
|
429
|
+
- restspec.gemspec
|
430
|
+
- spec/restspec/endpoints/dsl_spec.rb
|
431
|
+
- spec/restspec/endpoints/endpoint_spec.rb
|
432
|
+
- spec/restspec/endpoints/namespace_spec.rb
|
433
|
+
- spec/restspec/endpoints/response_spec.rb
|
434
|
+
- spec/restspec/schema/attribute_example_spec.rb
|
435
|
+
- spec/restspec/schema/dsl_spec.rb
|
436
|
+
- spec/restspec/schema/schema_example_spec.rb
|
437
|
+
- spec/restspec/schema/schema_spec.rb
|
438
|
+
- spec/restspec/schema/types/array_type_spec.rb
|
439
|
+
- spec/restspec/schema/types/basic_type_spec.rb
|
440
|
+
- spec/restspec/schema/types/boolean_type_spec.rb
|
441
|
+
- spec/restspec/schema/types/null_type_spec.rb
|
442
|
+
- spec/restspec/schema/types/string_type_spec.rb
|
443
|
+
- spec/restspec/values/status_code_spec.rb
|
444
|
+
- spec/spec_helper.rb
|
445
|
+
homepage: ''
|
446
|
+
licenses:
|
447
|
+
- MIT
|
448
|
+
metadata: {}
|
449
|
+
post_install_message:
|
450
|
+
rdoc_options: []
|
451
|
+
require_paths:
|
452
|
+
- lib
|
453
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
454
|
+
requirements:
|
455
|
+
- - ">="
|
456
|
+
- !ruby/object:Gem::Version
|
457
|
+
version: '0'
|
458
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
459
|
+
requirements:
|
460
|
+
- - ">="
|
461
|
+
- !ruby/object:Gem::Version
|
462
|
+
version: '0'
|
463
|
+
requirements: []
|
464
|
+
rubyforge_project:
|
465
|
+
rubygems_version: 2.2.2
|
466
|
+
signing_key:
|
467
|
+
specification_version: 4
|
468
|
+
summary: RSpec macros, helpers and matchers to work with APIs
|
469
|
+
test_files:
|
470
|
+
- spec/restspec/endpoints/dsl_spec.rb
|
471
|
+
- spec/restspec/endpoints/endpoint_spec.rb
|
472
|
+
- spec/restspec/endpoints/namespace_spec.rb
|
473
|
+
- spec/restspec/endpoints/response_spec.rb
|
474
|
+
- spec/restspec/schema/attribute_example_spec.rb
|
475
|
+
- spec/restspec/schema/dsl_spec.rb
|
476
|
+
- spec/restspec/schema/schema_example_spec.rb
|
477
|
+
- spec/restspec/schema/schema_spec.rb
|
478
|
+
- spec/restspec/schema/types/array_type_spec.rb
|
479
|
+
- spec/restspec/schema/types/basic_type_spec.rb
|
480
|
+
- spec/restspec/schema/types/boolean_type_spec.rb
|
481
|
+
- spec/restspec/schema/types/null_type_spec.rb
|
482
|
+
- spec/restspec/schema/types/string_type_spec.rb
|
483
|
+
- spec/restspec/values/status_code_spec.rb
|
484
|
+
- spec/spec_helper.rb
|