rspec-rabl 1.0.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 +7 -0
- data/.gitignore +17 -0
- data/.rspec +2 -0
- data/.travis.yml +10 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +87 -0
- data/Rakefile +6 -0
- data/lib/rspec/rabl/attribute_matcher.rb +96 -0
- data/lib/rspec/rabl/error.rb +7 -0
- data/lib/rspec/rabl/example_group.rb +42 -0
- data/lib/rspec/rabl/helpers.rb +22 -0
- data/lib/rspec/rabl/matchers.rb +9 -0
- data/lib/rspec/rabl/rails.rb +6 -0
- data/lib/rspec/rabl/version.rb +5 -0
- data/lib/rspec/rabl.rb +17 -0
- data/rspec-rabl.gemspec +26 -0
- data/spec/fixtures/bare_index.rabl +2 -0
- data/spec/fixtures/index.rabl +2 -0
- data/spec/fixtures/nested/test.rabl +2 -0
- data/spec/fixtures/rootless_index.rabl +2 -0
- data/spec/fixtures/user.rabl +5 -0
- data/spec/fixtures/user_aliases.rabl +3 -0
- data/spec/functional/custom_matchers_spec.rb +62 -0
- data/spec/functional/render_object_spec.rb +29 -0
- data/spec/functional/shared_examples_spec.rb +11 -0
- data/spec/spec_helper.rb +16 -0
- data/spec/support/full_name_renderer_examples.rb +4 -0
- data/spec/support/user_context.rb +9 -0
- metadata +154 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f9a36cec71cf30a760be8e02f5ce12fbb6659040
|
4
|
+
data.tar.gz: 4ad2e2335d3b9be558e549a3047b836b70ccf724
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e9c0e11a4ea868b5a3aca341cae622e4e8ba930aa7709241e9af0050579db94cb10161ad344f3dc1863a10fd5a4cd98f485c3b92a40d301462a8f7ea6c8b2efb
|
7
|
+
data.tar.gz: 0ece30ab3bcbffb037e1cb4825daf3800febbb2dac3296a586fad162a462683e94b9b15f15309f749f4dadeb2314ee11b15d80e3897ecd679879acee224bea3e
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Michael Ries
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
[](https://travis-ci.org/mmmries/rspec_rabl)
|
2
|
+
[](https://codeclimate.com/github/mmmries/rspec_rabl)
|
3
|
+
[](https://gemnasium.com/mmmries/rspec_rabl)
|
4
|
+
|
5
|
+
# RspecRabl
|
6
|
+
|
7
|
+
A collection of convenient helpers for writing view specs with rabl templates.
|
8
|
+
|
9
|
+
## Update Notes
|
10
|
+
|
11
|
+
If you were previously using the `rspec_rabl` gem please note that you will need to fix a few things in order to upgrade to the latest version:
|
12
|
+
|
13
|
+
* change your Gemfile to require `rspec-rabl` (a hyphen instead of an underscore see #8 for more details)
|
14
|
+
* in spec\_helper.rb you need to require `rspec/rabl` instead of `rspec_rabl`
|
15
|
+
* if you are using rails and you want the default configuration you will need to require `rspec/rabl/rails` instead of `rspec/rails_rabl`
|
16
|
+
|
17
|
+
## Usage
|
18
|
+
|
19
|
+
First make sure you configure rspec-rabl in your spec\_helper.rb file (see Configuration below).
|
20
|
+
|
21
|
+
Now your templates can be rendered with whatever data you like for testing:
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
describe "budgets/show/rabl" do # this tells us what template you want to test
|
25
|
+
let(:budget) { Budget.new }
|
26
|
+
rabl_data(:root => 'budget') { budget } # this tells us what data to use when rendering and what structure you expect the template to have (use root and object_root just like rabl)
|
27
|
+
|
28
|
+
it "renders valid json" do
|
29
|
+
expect {
|
30
|
+
JSON.parse(rendered_template) # rendered_template is the rendered string
|
31
|
+
}.not_to raise_error
|
32
|
+
end
|
33
|
+
|
34
|
+
it "renders the data in some specific way" do
|
35
|
+
expect(parsed_json['budget']['date']).to eq("1984") # parsed_json is the parsed out version of the rendered string
|
36
|
+
end
|
37
|
+
end
|
38
|
+
```
|
39
|
+
|
40
|
+
But most of the time you want to check some pretty common things like:
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
describe "budgets/show.rabl" do
|
44
|
+
let(:budget) { Budget.new }
|
45
|
+
rabl_data(:root => 'budget') { budget }
|
46
|
+
|
47
|
+
it { expect(subject).to render_attribute(:amount) } # parsed_json['budget']['amount'] == budget.amount
|
48
|
+
it { expect(subject).to render_attribute(:amount).with(:friendly_amount) } # parsed_json['budget']['amount'] == budget.friendly_amount
|
49
|
+
it { expect(subject).to render_attribute(:amount).with_value("45.00") } # parsed_json['budget']['amount'] == "45.00"
|
50
|
+
end
|
51
|
+
|
52
|
+
describe "budgets/index.rabl" do
|
53
|
+
let(:budgets) { [ Budget.new ] }
|
54
|
+
rabl_data(:root => 'budgets', :object_root => 'budget') { budgets }
|
55
|
+
|
56
|
+
it { expect(subject).to render_attribute(:amount) } # parsed_json['budgets'].first['budget']['amount'] == budgets.first.amount
|
57
|
+
end
|
58
|
+
```
|
59
|
+
|
60
|
+
If you don't want to specify the template you are testing via the describe/context string you can specify the template like this:
|
61
|
+
|
62
|
+
```ruby
|
63
|
+
describe "Users are rendered with the humorous attribute" do
|
64
|
+
rabl_template { "users/show.rabl" }
|
65
|
+
rabl_data(:root => 'user') { user }
|
66
|
+
|
67
|
+
specify { expect(subject).to render_attribute(:humorous).with_value("not really") }
|
68
|
+
end
|
69
|
+
```
|
70
|
+
|
71
|
+
## Configuration
|
72
|
+
|
73
|
+
The easiest way to configure this is simple
|
74
|
+
|
75
|
+
```ruby
|
76
|
+
require 'rspec/rabl/rails'
|
77
|
+
```
|
78
|
+
|
79
|
+
For more detailed configuration just look at that file to see what configurations it is making.
|
80
|
+
|
81
|
+
## Contributing
|
82
|
+
|
83
|
+
1. Fork it
|
84
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
85
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
86
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
87
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
module RSpec
|
2
|
+
module Rabl
|
3
|
+
class AttributeMatcher
|
4
|
+
def initialize(rendered_attribute, opts = {})
|
5
|
+
@rendered_attribute = rendered_attribute
|
6
|
+
@opts = opts
|
7
|
+
end
|
8
|
+
|
9
|
+
def description
|
10
|
+
"render the #{rendered_attribute} attribute"
|
11
|
+
end
|
12
|
+
|
13
|
+
def failure_message
|
14
|
+
"expected #{parsed} to render #{rendered_attribute} = #{expected_value}"
|
15
|
+
end
|
16
|
+
|
17
|
+
def matches?(subject)
|
18
|
+
@subject = subject
|
19
|
+
attribute_rendered? && rendered_value == expected_value
|
20
|
+
end
|
21
|
+
|
22
|
+
def with(model_attribute)
|
23
|
+
@model_attribute = model_attribute
|
24
|
+
self
|
25
|
+
end
|
26
|
+
|
27
|
+
def with_value(expected_value)
|
28
|
+
@expected_value = expected_value
|
29
|
+
self
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
attr_reader :rendered_attribute, :subject, :opts
|
34
|
+
|
35
|
+
def model_attribute
|
36
|
+
@model_attribute ||= rendered_attribute
|
37
|
+
end
|
38
|
+
|
39
|
+
def expected_value
|
40
|
+
@expected_value ||= get_attribute_from_rendered_object
|
41
|
+
end
|
42
|
+
|
43
|
+
def rendered_value
|
44
|
+
parsed_object[rendered_attribute.to_s]
|
45
|
+
end
|
46
|
+
|
47
|
+
def rendered_object
|
48
|
+
subject.object
|
49
|
+
end
|
50
|
+
|
51
|
+
def attribute_rendered?
|
52
|
+
parsed_object.has_key?(rendered_attribute.to_s)
|
53
|
+
end
|
54
|
+
|
55
|
+
def get_attribute_from_rendered_object
|
56
|
+
if collection?
|
57
|
+
rendered_object.first.public_send(model_attribute)
|
58
|
+
else
|
59
|
+
rendered_object.public_send(model_attribute)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def collection?
|
64
|
+
rendered_object.is_a?(Array)
|
65
|
+
end
|
66
|
+
|
67
|
+
def parsed_object
|
68
|
+
collection? ? parse_collection_object : parse_object
|
69
|
+
end
|
70
|
+
|
71
|
+
def parse_collection_object
|
72
|
+
data = parsed
|
73
|
+
if opts[:root]
|
74
|
+
data = data.fetch(opts[:root]){ raise ::RSpec::Rabl::Error.new("Missing Root #{opts[:root]}") }
|
75
|
+
end
|
76
|
+
data = data.first
|
77
|
+
if opts[:object_root]
|
78
|
+
data = data.fetch(opts[:object_root]){ raise ::RSpec::Rabl::Error.new("Missing Object Root #{opts[:object_root]}") }
|
79
|
+
end
|
80
|
+
data
|
81
|
+
end
|
82
|
+
|
83
|
+
def parse_object
|
84
|
+
if opts[:root]
|
85
|
+
parsed.fetch(opts[:root]){ raise ::RSpec::Rabl::Error.new("Missing Object Root") }
|
86
|
+
else
|
87
|
+
parsed
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
def parsed
|
92
|
+
@parsed ||= JSON.parse(subject.render)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module RSpec
|
2
|
+
module Rabl
|
3
|
+
module ExampleGroup
|
4
|
+
def parsed_json
|
5
|
+
JSON.parse(rendered_template)
|
6
|
+
end
|
7
|
+
|
8
|
+
def rendered_template
|
9
|
+
renderer.render
|
10
|
+
end
|
11
|
+
|
12
|
+
def renderer
|
13
|
+
@renderer ||= ::Rabl::Renderer.new(
|
14
|
+
_rabl_template.gsub('.rabl',''),
|
15
|
+
_rabl_data,
|
16
|
+
:view_path => _rabl_config[:view_paths],
|
17
|
+
)
|
18
|
+
end
|
19
|
+
|
20
|
+
def subject
|
21
|
+
renderer
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
def _rabl_config
|
26
|
+
RSpec.configuration.rabl_configuration
|
27
|
+
end
|
28
|
+
|
29
|
+
def _rabl_data
|
30
|
+
nil
|
31
|
+
end
|
32
|
+
|
33
|
+
def _rabl_opts
|
34
|
+
{}
|
35
|
+
end
|
36
|
+
|
37
|
+
def _rabl_template
|
38
|
+
RSpec.current_example.metadata[:example_group][:description]
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module RSpec
|
2
|
+
module Rabl
|
3
|
+
module Helpers
|
4
|
+
def rabl_data(opts = {},&block)
|
5
|
+
let(:_rabl_opts){ opts }
|
6
|
+
let(:_rabl_data, &block)
|
7
|
+
end
|
8
|
+
|
9
|
+
def rabl_template(&block)
|
10
|
+
let(:_rabl_template, &block)
|
11
|
+
end
|
12
|
+
|
13
|
+
def view_path(relative_path)
|
14
|
+
let(:_view_path) { relative_path }
|
15
|
+
end
|
16
|
+
|
17
|
+
def rabl_config(local_config)
|
18
|
+
let(:_rabl_config) { RSpec.configuration.rabl_configuration.merge(local_config) }
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,6 @@
|
|
1
|
+
::RSpec.configure do |config|
|
2
|
+
config.include ::RSpec::Rabl::Matchers, :file_path => %r(spec/views)
|
3
|
+
config.include ::RSpec::Rabl::ExampleGroup, :file_path => %r(spec/views)
|
4
|
+
config.rabl_configuration = {:view_paths => ['app/views']}
|
5
|
+
config.extend ::RSpec::Rabl::Helpers
|
6
|
+
end
|
data/lib/rspec/rabl.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require "rspec/rabl/version"
|
3
|
+
require "rspec/rabl/error"
|
4
|
+
|
5
|
+
# helpers to access the rendered template and parsed template
|
6
|
+
require 'rspec/rabl/example_group'
|
7
|
+
# helpers that can be called outside an it block to configure data and settings
|
8
|
+
require 'rspec/rabl/helpers'
|
9
|
+
# custom matchers
|
10
|
+
require 'rspec/rabl/attribute_matcher'
|
11
|
+
# helpers for invoking the custom matchers
|
12
|
+
require 'rspec/rabl/matchers'
|
13
|
+
|
14
|
+
RSpec.configure do |c|
|
15
|
+
c.add_setting :rabl_configuration
|
16
|
+
c.include RSpec::Rabl::Matchers
|
17
|
+
end
|
data/rspec-rabl.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'rspec/rabl/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "rspec-rabl"
|
8
|
+
spec.version = RSpec::Rabl::VERSION
|
9
|
+
spec.authors = ["Michael Ries"]
|
10
|
+
spec.email = ["michael@riesd.com"]
|
11
|
+
spec.description = "Provides a more declarative form of view testing for users of rabl"
|
12
|
+
spec.summary = spec.description
|
13
|
+
spec.homepage = "https://github.com/mmmries/rspec_rabl"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "pry-nav"
|
24
|
+
spec.add_runtime_dependency "rspec" , "~> 3.0"
|
25
|
+
spec.add_runtime_dependency "rabl", "~> 0.9"
|
26
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
describe "Customer Matchers" do
|
2
|
+
include_context "user_context"
|
3
|
+
|
4
|
+
describe "user.rabl" do
|
5
|
+
rabl_data(:root => 'user'){ user }
|
6
|
+
it{ expect(subject).to render_attribute(:guid) }
|
7
|
+
it{ expect(subject).to render_attribute(:first_name) }
|
8
|
+
it{ expect(subject).to render_attribute(:last_name) }
|
9
|
+
it{ expect(subject).to render_attribute(:email) }
|
10
|
+
it{ expect(subject).to_not render_attribute(:password) }
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "user_aliases.rabl" do
|
14
|
+
rabl_data(:root => 'user'){ user }
|
15
|
+
it{ expect(subject).to render_attribute(:id).with(:guid) }
|
16
|
+
it{ expect(subject).to render_attribute(:team).with_value('Gorby Puff') }
|
17
|
+
end
|
18
|
+
|
19
|
+
describe "index.rabl" do
|
20
|
+
rabl_data(:root => 'users', :object_root => 'user'){ [user] }
|
21
|
+
it{ expect(subject).to render_attribute(:guid) }
|
22
|
+
it{ expect(subject).to render_attribute(:first_name) }
|
23
|
+
it{ expect(subject).to render_attribute(:last_name) }
|
24
|
+
it{ expect(subject).to render_attribute(:email) }
|
25
|
+
it{ expect(subject).to_not render_attribute(:password) }
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "index.rabl" do
|
29
|
+
rabl_data(:root => 'foobar'){ [user] }
|
30
|
+
it "gives an error specific for missing root" do
|
31
|
+
expect{
|
32
|
+
expect(subject).to render_attribute(:guid)
|
33
|
+
}.to raise_error(RSpec::Rabl::Error, /missing root/i)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
describe "index.rabl" do
|
38
|
+
rabl_data(:root => 'users', :object_root => "player"){ [user] }
|
39
|
+
it "gives an error specific for incorrect object_root" do
|
40
|
+
expect{
|
41
|
+
expect(subject).to render_attribute(:guid)
|
42
|
+
}.to raise_error(RSpec::Rabl::Error, /missing object root/i)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe "rootless_index.rabl" do
|
47
|
+
rabl_data(:root => false, :object_root => 'user'){ [user] }
|
48
|
+
it{ expect(subject).to render_attribute(:guid) }
|
49
|
+
it{ expect(subject).to_not render_attribute(:password) }
|
50
|
+
end
|
51
|
+
|
52
|
+
describe "bare_index.rabl" do
|
53
|
+
rabl_data(:root => false, :object_root => false){ [user] }
|
54
|
+
it{ expect(subject).to render_attribute(:guid) }
|
55
|
+
it{ expect(subject).to_not render_attribute(:password) }
|
56
|
+
end
|
57
|
+
|
58
|
+
describe "nested/test.rabl" do
|
59
|
+
rabl_data(:root => 'test'){ user }
|
60
|
+
it{ expect(subject).to render_attribute(:guid) }
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
describe "User Views" do
|
2
|
+
include_context "user_context"
|
3
|
+
rabl_data{ user }
|
4
|
+
|
5
|
+
describe "user.rabl" do
|
6
|
+
it "makes the rendered template available" do
|
7
|
+
expect(rendered_template).to eq '{"user":{"guid":"abc","first_name":"gob","last_name":"bluth","email":"gob@bluth.com"}}'
|
8
|
+
end
|
9
|
+
|
10
|
+
it "makes the parsed template available" do
|
11
|
+
expect(parsed_json).to eq({
|
12
|
+
'user' => {
|
13
|
+
'guid' => user.guid,
|
14
|
+
'first_name' => user.first_name,
|
15
|
+
'last_name' => user.last_name,
|
16
|
+
'email' => user.email,
|
17
|
+
}
|
18
|
+
})
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe "test.rabl" do
|
23
|
+
rabl_config( {:view_paths => 'spec/fixtures/nested'} )
|
24
|
+
|
25
|
+
it "should allow us to override the Rabl config" do
|
26
|
+
expect(parsed_json).to eq({'test' => {'guid' => user.guid}})
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'support/full_name_renderer_examples'
|
2
|
+
|
3
|
+
RSpec.describe "using shared examples" do
|
4
|
+
include_context "user_context"
|
5
|
+
rabl_template { "user.rabl" }
|
6
|
+
rabl_data(:root => 'user'){ user }
|
7
|
+
|
8
|
+
include_examples "full name renderer"
|
9
|
+
it_behaves_like "full name renderer"
|
10
|
+
it_should_behave_like "full name renderer"
|
11
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'bundler/setup'
|
2
|
+
require 'json'
|
3
|
+
require 'pry-nav'
|
4
|
+
require 'rabl'
|
5
|
+
require 'rspec'
|
6
|
+
require 'rspec/rabl'
|
7
|
+
|
8
|
+
require 'support/user_context'
|
9
|
+
|
10
|
+
RSpec.configure do |c|
|
11
|
+
c.order = :rand
|
12
|
+
c.include RSpec::Rabl::ExampleGroup
|
13
|
+
c.rabl_configuration = {:view_paths => 'spec/fixtures'}
|
14
|
+
end
|
15
|
+
|
16
|
+
include RSpec::Rabl::Helpers
|
metadata
ADDED
@@ -0,0 +1,154 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rspec-rabl
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Michael Ries
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-03-17 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: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: pry-nav
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rabl
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.9'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.9'
|
83
|
+
description: Provides a more declarative form of view testing for users of rabl
|
84
|
+
email:
|
85
|
+
- michael@riesd.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".gitignore"
|
91
|
+
- ".rspec"
|
92
|
+
- ".travis.yml"
|
93
|
+
- Gemfile
|
94
|
+
- LICENSE.txt
|
95
|
+
- README.md
|
96
|
+
- Rakefile
|
97
|
+
- lib/rspec/rabl.rb
|
98
|
+
- lib/rspec/rabl/attribute_matcher.rb
|
99
|
+
- lib/rspec/rabl/error.rb
|
100
|
+
- lib/rspec/rabl/example_group.rb
|
101
|
+
- lib/rspec/rabl/helpers.rb
|
102
|
+
- lib/rspec/rabl/matchers.rb
|
103
|
+
- lib/rspec/rabl/rails.rb
|
104
|
+
- lib/rspec/rabl/version.rb
|
105
|
+
- rspec-rabl.gemspec
|
106
|
+
- spec/fixtures/bare_index.rabl
|
107
|
+
- spec/fixtures/index.rabl
|
108
|
+
- spec/fixtures/nested/test.rabl
|
109
|
+
- spec/fixtures/rootless_index.rabl
|
110
|
+
- spec/fixtures/user.rabl
|
111
|
+
- spec/fixtures/user_aliases.rabl
|
112
|
+
- spec/functional/custom_matchers_spec.rb
|
113
|
+
- spec/functional/render_object_spec.rb
|
114
|
+
- spec/functional/shared_examples_spec.rb
|
115
|
+
- spec/spec_helper.rb
|
116
|
+
- spec/support/full_name_renderer_examples.rb
|
117
|
+
- spec/support/user_context.rb
|
118
|
+
homepage: https://github.com/mmmries/rspec_rabl
|
119
|
+
licenses:
|
120
|
+
- MIT
|
121
|
+
metadata: {}
|
122
|
+
post_install_message:
|
123
|
+
rdoc_options: []
|
124
|
+
require_paths:
|
125
|
+
- lib
|
126
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
|
+
requirements:
|
133
|
+
- - ">="
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '0'
|
136
|
+
requirements: []
|
137
|
+
rubyforge_project:
|
138
|
+
rubygems_version: 2.4.5
|
139
|
+
signing_key:
|
140
|
+
specification_version: 4
|
141
|
+
summary: Provides a more declarative form of view testing for users of rabl
|
142
|
+
test_files:
|
143
|
+
- spec/fixtures/bare_index.rabl
|
144
|
+
- spec/fixtures/index.rabl
|
145
|
+
- spec/fixtures/nested/test.rabl
|
146
|
+
- spec/fixtures/rootless_index.rabl
|
147
|
+
- spec/fixtures/user.rabl
|
148
|
+
- spec/fixtures/user_aliases.rabl
|
149
|
+
- spec/functional/custom_matchers_spec.rb
|
150
|
+
- spec/functional/render_object_spec.rb
|
151
|
+
- spec/functional/shared_examples_spec.rb
|
152
|
+
- spec/spec_helper.rb
|
153
|
+
- spec/support/full_name_renderer_examples.rb
|
154
|
+
- spec/support/user_context.rb
|