rspec_extensions_collection 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +49 -0
- data/README.rdoc +55 -0
- data/Rakefile +2 -0
- data/lib/rspec_extensions_collection.rb +3 -0
- data/lib/rspec_extensions_collection/helpers/mongoid_model_helpers.rb +13 -0
- data/lib/rspec_extensions_collection/matchers/search_embedded_matcher.rb +62 -0
- data/lib/rspec_extensions_collection/matchers/search_matcher.rb +104 -0
- data/lib/rspec_extensions_collection/version.rb +3 -0
- data/rspec_extensions_collection.gemspec +26 -0
- data/spec/models/blog_post.rb +38 -0
- data/spec/models/blogs/comment.rb +28 -0
- data/spec/rspec_extensions_collection/helpers/mongoid_model_helpers_spec.rb +37 -0
- data/spec/rspec_extensions_collection/matchers/search_embedded_matcher_spec.rb +29 -0
- data/spec/rspec_extensions_collection/matchers/search_matcher_spec.rb +29 -0
- data/spec/spec.opts +2 -0
- data/spec/spec_helper.rb +22 -0
- metadata +137 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rspec_extensions_collection (0.0.3)
|
5
|
+
rspec
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: http://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activemodel (3.0.3)
|
11
|
+
activesupport (= 3.0.3)
|
12
|
+
builder (~> 2.1.2)
|
13
|
+
i18n (~> 0.4)
|
14
|
+
activesupport (3.0.3)
|
15
|
+
bson (1.1.5)
|
16
|
+
bson_ext (1.1.5)
|
17
|
+
builder (2.1.2)
|
18
|
+
diff-lcs (1.1.2)
|
19
|
+
i18n (0.5.0)
|
20
|
+
mongo (1.1.5)
|
21
|
+
bson (>= 1.1.5)
|
22
|
+
mongoid (2.0.0.beta.20)
|
23
|
+
activemodel (~> 3.0)
|
24
|
+
mongo (~> 1.1)
|
25
|
+
tzinfo (~> 0.3.22)
|
26
|
+
will_paginate (~> 3.0.pre)
|
27
|
+
mongoid-rspec (1.2.1)
|
28
|
+
bson_ext (>= 1.0.4)
|
29
|
+
mongoid (>= 2.0.0.beta.15)
|
30
|
+
rspec (>= 2.0.0.beta.19)
|
31
|
+
rspec (2.3.0)
|
32
|
+
rspec-core (~> 2.3.0)
|
33
|
+
rspec-expectations (~> 2.3.0)
|
34
|
+
rspec-mocks (~> 2.3.0)
|
35
|
+
rspec-core (2.3.1)
|
36
|
+
rspec-expectations (2.3.0)
|
37
|
+
diff-lcs (~> 1.1.2)
|
38
|
+
rspec-mocks (2.3.0)
|
39
|
+
tzinfo (0.3.23)
|
40
|
+
will_paginate (3.0.pre2)
|
41
|
+
|
42
|
+
PLATFORMS
|
43
|
+
ruby
|
44
|
+
|
45
|
+
DEPENDENCIES
|
46
|
+
bundler (>= 1.0.0)
|
47
|
+
mongoid-rspec
|
48
|
+
rspec
|
49
|
+
rspec_extensions_collection!
|
data/README.rdoc
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
= RSpec extensions collection
|
2
|
+
|
3
|
+
This is a collection of various RSpec extensions I would like to use for multiple projects.
|
4
|
+
The primary purpose is for me to use them anywhere so it's not necessarily made for generic use.
|
5
|
+
|
6
|
+
== Install
|
7
|
+
|
8
|
+
Put the following in Gemfile:
|
9
|
+
gem "rspec_extensions_collection"
|
10
|
+
Then execute:
|
11
|
+
bundle install
|
12
|
+
|
13
|
+
== Set up
|
14
|
+
|
15
|
+
1. Helpers
|
16
|
+
|
17
|
+
Include a helper you want to use in Spec.
|
18
|
+
Or include a helper in spec_helper.rb. e.g.
|
19
|
+
config.include RSpecExtensionsCollection::Matchers::MongoidModelHelpers
|
20
|
+
|
21
|
+
2. Matchers
|
22
|
+
|
23
|
+
Put the following in spec_helper.rb:
|
24
|
+
config.include RSpecExtensionsCollection::Matchers
|
25
|
+
|
26
|
+
== Usage
|
27
|
+
|
28
|
+
1. Helpers
|
29
|
+
|
30
|
+
2. Matchers
|
31
|
+
|
32
|
+
2-1. SearchMatcher
|
33
|
+
|
34
|
+
search_by(*args)
|
35
|
+
|
36
|
+
args: List of field name symbols.
|
37
|
+
Last argument can be Hash of options.
|
38
|
+
:locale - Specifies the locale on which the filtering the search result is based on. "en" or "fr".
|
39
|
+
|
40
|
+
The method to test: search(keyword)
|
41
|
+
|
42
|
+
Example: BlogPost.should search_by(:title, :content, :locale => I18n.locale.to_s)
|
43
|
+
|
44
|
+
2-2. SearchEmbeddedMatcher - For Mongoid embedded documents.
|
45
|
+
|
46
|
+
search_embedded_by(association_name, *args)
|
47
|
+
|
48
|
+
association_name: Name of the embedded document specified in the parent document.
|
49
|
+
args: List of field name symbols.
|
50
|
+
Last argument can be Hash of options.
|
51
|
+
:locale - Specifies the locale on which the filtering the search result is based on. "en" or "fr".
|
52
|
+
|
53
|
+
The method to test: search_embedded_by(keyword)
|
54
|
+
|
55
|
+
Example: BlogPost.should search_embedded_by(:comments, :content, :locale => I18n.locale.to_s)
|
data/Rakefile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
module RSpecExtensionsCollection
|
2
|
+
module Matchers
|
3
|
+
module MongoidModelHelpers
|
4
|
+
|
5
|
+
# Mongoid executes query only when it's needed. Until then, it just creates Criteria object.
|
6
|
+
# For the purpose of test, this method gets the result models array from Criteria object as usually done in for loop in view.
|
7
|
+
def execute_query_to_models(result_array_mongoid_criteria)
|
8
|
+
result_array_mongoid_criteria.map { |model| model }
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
require 'rspec_extensions_collection/matchers/search_matcher'
|
2
|
+
|
3
|
+
module RSpecExtensionsCollection
|
4
|
+
module Matchers
|
5
|
+
|
6
|
+
# Asserts the search is made with the given fields for embedded Mongoid document
|
7
|
+
# with the option specifying if the result if filtered by locale.
|
8
|
+
# The method to test: search_embedded(keyword)
|
9
|
+
#
|
10
|
+
# Options:
|
11
|
+
#
|
12
|
+
# association_name: Name of the embedded document specified in the parent document.
|
13
|
+
# args: List of field name symbols.
|
14
|
+
# Last argument can be +Hash+ of options.
|
15
|
+
# :locale - Specifies the locale on which the filtering the search result is based on. "en" or "fr".
|
16
|
+
#
|
17
|
+
# Example:
|
18
|
+
#
|
19
|
+
# <tt>BlogPost.should search_embedded_by(:comments, :title, :content, :locale => I18n.locale.to_s)</tt>
|
20
|
+
def search_embedded_by(association_name, *args)
|
21
|
+
SearchEmbeddedMatcher.new(association_name, *args)
|
22
|
+
end
|
23
|
+
|
24
|
+
class SearchEmbeddedMatcher < SearchMatcher
|
25
|
+
|
26
|
+
def initialize(association_name, *args)
|
27
|
+
@association_name = association_name
|
28
|
+
super(*args)
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
# Executes the method in concern such as search:
|
33
|
+
def execute
|
34
|
+
@model_class.search_embedded(KEYWORD)
|
35
|
+
end
|
36
|
+
|
37
|
+
def create_model(field_with_keyword, locale = nil)
|
38
|
+
# TODO: Replace with factory:
|
39
|
+
parent_model = @model_class.create(:title => "Title", :content => "Content")
|
40
|
+
|
41
|
+
embedded_model = parent_model.send(@association_name).build
|
42
|
+
@fields.each do |field|
|
43
|
+
field_writer_symbol = "#{field}=".to_sym
|
44
|
+
if field == field_with_keyword
|
45
|
+
embedded_model.send(field_writer_symbol, FIELD_CONTENT_WITH_KEYWORD)
|
46
|
+
else
|
47
|
+
embedded_model.send(field_writer_symbol, FIELD_CONTENT_WITHOUT_KEYWORD)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
embedded_model.locale = locale if locale
|
51
|
+
|
52
|
+
embedded_model.save
|
53
|
+
|
54
|
+
parent_model.update_attributes(:locale => locale) if locale
|
55
|
+
|
56
|
+
parent_model
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,104 @@
|
|
1
|
+
module RSpecExtensionsCollection
|
2
|
+
module Matchers
|
3
|
+
|
4
|
+
# Asserts the search is made with the given fields with the option specifying if the result if filtered by locale.
|
5
|
+
# The method to test: search(keyword)
|
6
|
+
#
|
7
|
+
# Options:
|
8
|
+
#
|
9
|
+
# args: List of field name symbols.
|
10
|
+
# Last argument can be +Hash+ of options.
|
11
|
+
# :locale - Specifies the locale on which the filtering the search result is based on. "en" or "fr".
|
12
|
+
#
|
13
|
+
# Example:
|
14
|
+
#
|
15
|
+
# <tt>BlogPost.should search_by(:title, :content, :locale => I18n.locale.to_s)</tt>
|
16
|
+
def search_by(*args)
|
17
|
+
SearchMatcher.new(*args)
|
18
|
+
end
|
19
|
+
|
20
|
+
class SearchMatcher
|
21
|
+
include MongoidModelHelpers
|
22
|
+
|
23
|
+
KEYWORD = "temp"
|
24
|
+
FIELD_CONTENT_WITH_KEYWORD = "This contains the keyword #{KEYWORD} and something else."
|
25
|
+
FIELD_CONTENT_WITHOUT_KEYWORD = "Used for some data."
|
26
|
+
LOCALES = ["en", "fr"]
|
27
|
+
|
28
|
+
def initialize(*args)
|
29
|
+
if args.try(:last).instance_of?(Hash)
|
30
|
+
@locale = args.pop[:locale]
|
31
|
+
end
|
32
|
+
@fields = args
|
33
|
+
end
|
34
|
+
|
35
|
+
def matches?(model_class)
|
36
|
+
@model_class = model_class
|
37
|
+
@model_class.delete_all
|
38
|
+
create_models
|
39
|
+
@search_result = execute
|
40
|
+
execute_query_to_models(@search_result.asc(:_id)) == @matching_models
|
41
|
+
end
|
42
|
+
|
43
|
+
def failure_message_for_should
|
44
|
+
"expected #{@model_class} to find #{@matching_models} but got #{execute_query_to_models(@search_result)}"
|
45
|
+
end
|
46
|
+
|
47
|
+
private
|
48
|
+
# Executes the method in concern such as search:
|
49
|
+
def execute
|
50
|
+
@model_class.search(KEYWORD)
|
51
|
+
end
|
52
|
+
|
53
|
+
def create_models
|
54
|
+
@all_models = []
|
55
|
+
@matching_models = []
|
56
|
+
|
57
|
+
(0..@fields.size-1).each do |index|
|
58
|
+
if @locale
|
59
|
+
model_with_matching_locale = create_model(@fields[index], @locale)
|
60
|
+
@matching_models << model_with_matching_locale
|
61
|
+
@all_models << model_with_matching_locale
|
62
|
+
|
63
|
+
model_with_other_locale = create_model(@fields[index], other_locale)
|
64
|
+
@all_models << model_with_other_locale
|
65
|
+
else
|
66
|
+
model = create_model(@fields[index])
|
67
|
+
@matching_models << model
|
68
|
+
@all_models << model
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
if @locale
|
73
|
+
LOCALES.each { |locale| @all_models << create_model(nil, locale) }
|
74
|
+
else
|
75
|
+
@all_models << create_model(nil)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def create_model(field_with_keyword, locale = nil)
|
80
|
+
model = @model_class.new do |model_object|
|
81
|
+
@fields.each do |field|
|
82
|
+
field_writer_symbol = "#{field}=".to_sym
|
83
|
+
if field == field_with_keyword
|
84
|
+
model_object.send(field_writer_symbol, FIELD_CONTENT_WITH_KEYWORD)
|
85
|
+
else
|
86
|
+
model_object.send(field_writer_symbol, FIELD_CONTENT_WITHOUT_KEYWORD)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
model_object.locale = locale if locale
|
90
|
+
end
|
91
|
+
model.save!
|
92
|
+
model
|
93
|
+
end
|
94
|
+
|
95
|
+
def other_locale
|
96
|
+
locales_copy = Array.new(LOCALES)
|
97
|
+
locales_copy.delete(@locale)
|
98
|
+
locales_copy.first
|
99
|
+
end
|
100
|
+
|
101
|
+
end
|
102
|
+
|
103
|
+
end
|
104
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path("../lib/rspec_extensions_collection/version", __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "rspec_extensions_collection"
|
6
|
+
s.version = RspecExtensionsCollection::VERSION
|
7
|
+
s.platform = Gem::Platform::RUBY
|
8
|
+
s.authors = ["Tadatoshi Takahashi"]
|
9
|
+
s.email = ["tadatoshi.3.takahashi@gmail.com"]
|
10
|
+
s.homepage = "http://rubygems.org/gems/rspec_extensions_collection"
|
11
|
+
s.summary = "Collection of various RSpec extensions"
|
12
|
+
s.description = "Collection of RSpec extensions incluing helper methods, matchers, and macros that the author would like to use for multiple projects."
|
13
|
+
|
14
|
+
s.required_rubygems_version = ">= 1.3.6"
|
15
|
+
s.rubyforge_project = "rspec_extensions_collection"
|
16
|
+
|
17
|
+
s.add_dependency "rspec"
|
18
|
+
|
19
|
+
s.add_development_dependency "bundler", ">= 1.0.0"
|
20
|
+
s.add_development_dependency "rspec"
|
21
|
+
s.add_development_dependency "mongoid-rspec"
|
22
|
+
|
23
|
+
s.files = `git ls-files`.split("\n")
|
24
|
+
s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
|
25
|
+
s.require_path = 'lib'
|
26
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
class BlogPost
|
2
|
+
include Mongoid::Document
|
3
|
+
|
4
|
+
field :title
|
5
|
+
field :content
|
6
|
+
field :locale
|
7
|
+
|
8
|
+
index :title
|
9
|
+
index :locale
|
10
|
+
|
11
|
+
before_validation :assign_current_locale
|
12
|
+
|
13
|
+
validates :title, :presence => true
|
14
|
+
validates :locale, :presence => true
|
15
|
+
|
16
|
+
embeds_many :comments, :class_name => "Blogs::Comment"
|
17
|
+
|
18
|
+
scope :ordered, desc(:_id)
|
19
|
+
scope :in_current_locale, lambda { where(:locale => I18n.locale.to_s) }
|
20
|
+
|
21
|
+
class << self
|
22
|
+
|
23
|
+
def search(keyword)
|
24
|
+
in_current_locale.where("this.title.match(/#{keyword}/i) || this.content.match(/#{keyword}/i)")
|
25
|
+
end
|
26
|
+
|
27
|
+
def search_embedded(keyword)
|
28
|
+
in_current_locale.where("comments.content" => Regexp.new(keyword))
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
def assign_current_locale
|
35
|
+
self.locale ||= I18n.locale.to_s
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Blogs
|
2
|
+
|
3
|
+
class Comment
|
4
|
+
include Mongoid::Document
|
5
|
+
|
6
|
+
field :content
|
7
|
+
field :locale
|
8
|
+
|
9
|
+
index :locale
|
10
|
+
|
11
|
+
before_validation :assign_current_locale
|
12
|
+
|
13
|
+
validates :content, :presence => true
|
14
|
+
validates :locale, :presence => true
|
15
|
+
|
16
|
+
embedded_in :blog_post, :inverse_of => :comments
|
17
|
+
|
18
|
+
scope :ordered, asc(:_id)
|
19
|
+
scope :in_current_locale, lambda { where(:locale => I18n.locale.to_s) }
|
20
|
+
|
21
|
+
private
|
22
|
+
def assign_current_locale
|
23
|
+
self.locale ||= I18n.locale.to_s
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "MongoidModelHelpers" do
|
4
|
+
include RSpecExtensionsCollection::Matchers::MongoidModelHelpers
|
5
|
+
|
6
|
+
describe BlogPost do
|
7
|
+
|
8
|
+
before(:each) do
|
9
|
+
BlogPost.delete_all
|
10
|
+
end
|
11
|
+
|
12
|
+
after(:each) do
|
13
|
+
BlogPost.delete_all
|
14
|
+
end
|
15
|
+
|
16
|
+
context "Scope" do
|
17
|
+
|
18
|
+
it "should have the current locale and be ordered by id" do
|
19
|
+
|
20
|
+
blog_post_1 = BlogPost.create(:locale => "fr", :title => "First blog entry", :content => "This is the first entry")
|
21
|
+
blog_post_2 = BlogPost.create(:locale => "fr", :title => "Second blog entry", :content => "This is the second entry")
|
22
|
+
blog_post_3 = BlogPost.create(:locale => "en", :title => "Third blog entry", :content => "This is the third entry")
|
23
|
+
blog_post_4 = BlogPost.create(:locale => "fr", :title => "Fourth blog entry", :content => "This is the fourth entry")
|
24
|
+
blog_post_5 = BlogPost.create(:locale => "en", :title => "Fifth blog entry", :content => "This is the fifth entry")
|
25
|
+
|
26
|
+
I18n.locale = "en"
|
27
|
+
execute_query_to_models(BlogPost.in_current_locale.ordered).should == [blog_post_5, blog_post_3]
|
28
|
+
I18n.locale = "fr"
|
29
|
+
execute_query_to_models(BlogPost.in_current_locale.ordered).should == [blog_post_4, blog_post_2, blog_post_1]
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "SearchEmbeddedMatcher" do
|
4
|
+
|
5
|
+
describe BlogPost do
|
6
|
+
|
7
|
+
before(:each) do
|
8
|
+
BlogPost.delete_all
|
9
|
+
I18n.locale = "en"
|
10
|
+
end
|
11
|
+
|
12
|
+
after(:each) do
|
13
|
+
BlogPost.delete_all
|
14
|
+
I18n.locale = "en"
|
15
|
+
end
|
16
|
+
|
17
|
+
context "Search" do
|
18
|
+
|
19
|
+
it "should find blog_post with a keyword contained in specified embedded document using custom matcher" do
|
20
|
+
|
21
|
+
BlogPost.should search_embedded_by(:comments, :content, :locale => I18n.locale.to_s)
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "SearchMatcher" do
|
4
|
+
|
5
|
+
describe BlogPost do
|
6
|
+
|
7
|
+
before(:each) do
|
8
|
+
BlogPost.delete_all
|
9
|
+
I18n.locale = "en"
|
10
|
+
end
|
11
|
+
|
12
|
+
after(:each) do
|
13
|
+
BlogPost.delete_all
|
14
|
+
I18n.locale = "en"
|
15
|
+
end
|
16
|
+
|
17
|
+
context "Search" do
|
18
|
+
|
19
|
+
it "should find blog_post with a keyword using custom matcher" do
|
20
|
+
|
21
|
+
BlogPost.should search_by(:title, :content, :locale => I18n.locale.to_s)
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
data/spec/spec.opts
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '/../lib/rspec_extensions_collection'))
|
2
|
+
|
3
|
+
require 'rspec'
|
4
|
+
require 'rspec/core'
|
5
|
+
require 'rspec/expectations'
|
6
|
+
require 'mongoid'
|
7
|
+
Dir[File.expand_path(File.join(File.dirname(__FILE__), '/../lib/', 'rspec_extensions_collection/**/*.rb'))].each {|f| require f}
|
8
|
+
Dir[File.join(File.dirname(__FILE__), "models/**/*.rb")].each {|f| require f}
|
9
|
+
|
10
|
+
Mongoid.configure do |config|
|
11
|
+
name = "rspec_extensions_collection_test"
|
12
|
+
host = "localhost"
|
13
|
+
config.master = Mongo::Connection.new.db(name)
|
14
|
+
end
|
15
|
+
|
16
|
+
RSpec.configure do |config|
|
17
|
+
# config.include RSpec::Matchers
|
18
|
+
# config.include Mongoid::Matchers
|
19
|
+
config.mock_with :rspec
|
20
|
+
|
21
|
+
config.include RSpecExtensionsCollection::Matchers
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,137 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rspec_extensions_collection
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
version: 0.0.3
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Tadatoshi Takahashi
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-12-28 00:00:00 -05:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: rspec
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
version: "0"
|
31
|
+
type: :runtime
|
32
|
+
version_requirements: *id001
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: bundler
|
35
|
+
prerelease: false
|
36
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
37
|
+
none: false
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 1
|
43
|
+
- 0
|
44
|
+
- 0
|
45
|
+
version: 1.0.0
|
46
|
+
type: :development
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: rspec
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
segments:
|
57
|
+
- 0
|
58
|
+
version: "0"
|
59
|
+
type: :development
|
60
|
+
version_requirements: *id003
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: mongoid-rspec
|
63
|
+
prerelease: false
|
64
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
segments:
|
70
|
+
- 0
|
71
|
+
version: "0"
|
72
|
+
type: :development
|
73
|
+
version_requirements: *id004
|
74
|
+
description: Collection of RSpec extensions incluing helper methods, matchers, and macros that the author would like to use for multiple projects.
|
75
|
+
email:
|
76
|
+
- tadatoshi.3.takahashi@gmail.com
|
77
|
+
executables: []
|
78
|
+
|
79
|
+
extensions: []
|
80
|
+
|
81
|
+
extra_rdoc_files: []
|
82
|
+
|
83
|
+
files:
|
84
|
+
- .gitignore
|
85
|
+
- Gemfile
|
86
|
+
- Gemfile.lock
|
87
|
+
- README.rdoc
|
88
|
+
- Rakefile
|
89
|
+
- lib/rspec_extensions_collection.rb
|
90
|
+
- lib/rspec_extensions_collection/helpers/mongoid_model_helpers.rb
|
91
|
+
- lib/rspec_extensions_collection/matchers/search_embedded_matcher.rb
|
92
|
+
- lib/rspec_extensions_collection/matchers/search_matcher.rb
|
93
|
+
- lib/rspec_extensions_collection/version.rb
|
94
|
+
- rspec_extensions_collection.gemspec
|
95
|
+
- spec/models/blog_post.rb
|
96
|
+
- spec/models/blogs/comment.rb
|
97
|
+
- spec/rspec_extensions_collection/helpers/mongoid_model_helpers_spec.rb
|
98
|
+
- spec/rspec_extensions_collection/matchers/search_embedded_matcher_spec.rb
|
99
|
+
- spec/rspec_extensions_collection/matchers/search_matcher_spec.rb
|
100
|
+
- spec/spec.opts
|
101
|
+
- spec/spec_helper.rb
|
102
|
+
has_rdoc: true
|
103
|
+
homepage: http://rubygems.org/gems/rspec_extensions_collection
|
104
|
+
licenses: []
|
105
|
+
|
106
|
+
post_install_message:
|
107
|
+
rdoc_options: []
|
108
|
+
|
109
|
+
require_paths:
|
110
|
+
- lib
|
111
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
112
|
+
none: false
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
segments:
|
117
|
+
- 0
|
118
|
+
version: "0"
|
119
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
|
+
none: false
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
segments:
|
125
|
+
- 1
|
126
|
+
- 3
|
127
|
+
- 6
|
128
|
+
version: 1.3.6
|
129
|
+
requirements: []
|
130
|
+
|
131
|
+
rubyforge_project: rspec_extensions_collection
|
132
|
+
rubygems_version: 1.3.7
|
133
|
+
signing_key:
|
134
|
+
specification_version: 3
|
135
|
+
summary: Collection of various RSpec extensions
|
136
|
+
test_files: []
|
137
|
+
|